Bug #97057 Password with a '#' character breaks Workbench Run SQL Script
Submitted: 28 Sep 2019 16:48 Modified: 5 Feb 12:42
Reporter: slie oneo Email Updates:
Status: Verified Impact on me:
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
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)

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] Miguel Solorzano
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] 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.

Ashwini Patil
[23 Jan 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.
[5 Feb 12:38] Ashwini Patil
Bug #98423 marked as duplicate of this one.
[5 Feb 12:42] Ashwini Patil
Hello slie oneo,

Thank you for the feedback.
Verified as described.

Ashwini Patil
[5 Feb 12:45] Ashwini Patil
8.0.19 test results

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