Bug #75212 Cannot export if password has high-ascii character
Submitted: 15 Dec 2014 8:03 Modified: 15 Dec 2014 8:28
Reporter: Gordon Ramshackle Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:6.2.4 OS:Microsoft Windows (Windows 8.1)
Assigned to: CPU Architecture:Any

[15 Dec 2014 8:03] Gordon Ramshackle
Description:
Exports fail with the following error if the account performing the task has a password that contains a high-ascii character.

For example, when exporting using an account having a password that includes the character "Ü", which is ASCII 220, I get the following.

Error executing task: 'ascii' codec can't encode character u'\xde' in position 7: ordinal not in range(128)

Judging from the error message, anything from ASCII 129 and over will thwart any export attempt.

I selected "Export to Self-Contained File", but if the same function is called to calculate the password hash, the same error will result.

How to repeat:
Create an admin account that has a high-ascii character in the password, anything from ASCII 129 and up. The password is legal and can perform most anything but it can't export.

Suggested fix:
Remove the high-ascii character from the password or create a new account without a high-ascii character in the password.
[15 Dec 2014 8:16] Gordon Ramshackle
Passwords that include ASCII 128 (€) will probably fail too.

For the sake of completeness, I tested ASCII 127 and ASCII 128 as single-character passwords.

ASCII 127 () worked.
ASCII 128 (€) failed.
[15 Dec 2014 8:28] Umesh Shastry
Hello Gordon,
 
Thank you for the report.
Confirmed this behavior on Win7(64bit) with WB 6.2.4.

Thanks,
Umesh
[15 Dec 2014 8:30] Umesh Shastry
// Create backup user with account having a password that includes the character "Ü"
 
 mysql> GRANT ALL ON *.* TO 'ushastry'@'%' IDENTIFIED BY 'Ü';
 Query OK, 0 rows affected (0.00 sec)
 
 mysql> show grants for 'ushastry'@'%';
 +------------------------------------------------------------------------------------------------------------------+
 | Grants for ushastry@%                                                                                            |
 +------------------------------------------------------------------------------------------------------------------+
 | GRANT ALL PRIVILEGES ON *.* TO 'ushastry'@'%' IDENTIFIED BY PASSWORD '*728CD07F2553EDDE088C89C56D2A0C3BA842BF50' |
 +------------------------------------------------------------------------------------------------------------------+
 1 row in set (0.00 sec)

// Try to export from WB
 
 13:45:44 Dumping test (all tables)
 Running: mysqldump.exe --defaults-file="c:\users\ushastry\appdata\local\temp\tmpi6ibgs.cnf"  --user=ushastry --host=x.x.x.x --protocol=tcp --port=15000 --default-character-set=utf8 --events "test"
 Error executing task: 'ascii' codec can't encode character u'\xdc' in position 0: ordinal not in range(128)
[16 May 2018 8:31] Zoltán Szalai
MySQL Workbench 6.3.6 still has the same bug.  Importing an sql file with Workbench (using mysql.exe) has failed. After opening the same sql file in the query editor it runs without errors.

.sql import error message:
"
09:22:46 Restoring C:\Users\myname\Desktop\Hibadatbank\dumps\doctypes.sql
Running: mysql.exe --defaults-file="c:\users\myname\appdata\local\temp\tmpdpibje.cnf"  --protocol=tcp --host=hostname --user=username --port=3306 --default-character-set=utf8 --comments --database=schemaname  < "C:\\Users\\myname\\Desktop\\Hibadatbank\\dumps\\doctypes.sql"
Error executing task: 'ascii' codec can't encode character u'\xf6' in position 23: ordinal not in range(128)
Error executing task [Error 32] A folyamat nem f�r hozz� a f�jlhoz, mert azt egy m�sik folyamat haszn�lja: 'c:\\users\\myname\\appdata\\local\\temp\\tmpdpibje.cnf'
09:22:46 Import of C:\Users\myname\Desktop\Hibadatbank\dumps\doctypes.sql has finished
"

Content of tmpdpibje.cnf:
[client]
password="

Password for username contains "ö" at position 23.  Import passes after changing that single letter in password.

How to replicate: Use Workbench to import any sql file with an account wich has "ö" in the password anywhere. Export works fine.