Bug #98423 Password with a '#' character breaks Workbench Run SQL Script

Submitted: 29 Jan 2020 0:17 Modified: 5 Feb 2020 12:35
Reporter: slie oneo Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.19 OS:Any
Assigned to: CPU Architecture:Any
Tags: 1045, access denied, Password with '#', Run SQL Script, workbench

[29 Jan 2020 0:17] slie oneo
Description:
If your user's password contains a hash symbol '#' (and possibly other characters too... I haven't checked them all), you can login to workbench using this password, but when you run the "Run SQL Script" from the File Menu, you get an error:

Run SQL Server
Error Executing SQL Script.
Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Preparing...
Importing bad_password.sql...
Finished executing script
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Passwords without '#' work fine.
Tested on Linux Ubuntu 18.04 and Windows 10.
Workbench 8.0.19
MySQL 8.0.19

Re-opening https://bugs.mysql.com/bug.php?id=97057
It's back in the new version.

How to repeat:
1. Use a root password with a '#' - Execute:
alter user root@localhost identified by 'password#';

2. Create a simple script file called bad_password.sql containing:
drop database if exists bad_password_test;
create database bad_password_test;

3. Login to MySQL Workbench using password: password#

4. Click File -> Run SQL Script
Open file: bad_password.sql
Click Run
Enter password: password#

5. Notice Error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

6. Use a root password without a '#' - Execute:
alter user root@localhost identified by 'password';

7. Repeat Steps 2, 3 and 4.

8. Notice script runs as expected.

Suggested fix:
Confirm and ensure that special characters (such as '#' and all others) are allowed to "Run SQL Scripts" from within MySQL Scripts.
[5 Feb 2020 12:35] MySQL Verification Team
Duplicate of Bug #97057, please see the Bug #97057.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.