Bug #97057 Password with a '#' character breaks Workbench Run SQL Script
Submitted: 28 Sep 16:48 Modified: 30 Sep 6:06
Reporter: slie oneo Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:Workbench 6.3.8 build 1228 CE OS:Any (Tested on Ubuntu 18.04 and Windows 10)
Assigned to: CPU Architecture:Any
Tags: 1045, access denied, Password with '#', Run SQL Script, workbench

[28 Sep 16:48] 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 6.3.8 build 1228
MySQL 8.0.17

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.
[29 Sep 3:33] Miguel Solorzano
Thank you for the bug report. Please try WorkBench version 8.0.17. Thanks.
[30 Sep 2:54] slie oneo
Fixed in Workbench 8.0.17.
[30 Sep 6:06] Ashwini Patil
Hello slie oneo,

Thank you for the report and confirmation that issue is no longer seen on latest WB 8.0.17.
Closing for now, but feel free to open if you encounter this issue again. Thank you for your interest in MySQL.

Regards,
Ashwini Patil