Bug #97057 Password with a '#' character breaks Workbench Run SQL Script
Submitted: 28 Sep 2019 16:48 Modified: 5 Feb 2020 12:42
Reporter: slie oneo Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:Workbench 6.3.8 build 1228 CE, wb 8.0.19 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 2019 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 2019 3:33] MySQL Verification Team
Thank you for the bug report. Please try WorkBench version 8.0.17. Thanks.
[30 Sep 2019 2:54] slie oneo
Fixed in Workbench 8.0.17.
[30 Sep 2019 6:06] MySQL Verification Team
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
[23 Jan 2020 22:09] slie oneo
This issue is back using 8.0.19!
I've upgrade both mysql-server and MySQL Workbench to 8.0.19 and this issue is happening again. Please re-open the ticket and investigate.
Thanks,
[5 Feb 2020 12:38] MySQL Verification Team
Bug #98423 marked as duplicate of this one.
[5 Feb 2020 12:42] MySQL Verification Team
Hello slie oneo,

Thank you for the feedback.
Verified as described.

Regards,
Ashwini Patil
[5 Feb 2020 12:45] MySQL Verification Team
8.0.19 test results

Attachment: 97057_results.png (image/png, text), 251.66 KiB.