Bug #76310 MySQL Connectors Connector/ODBC password character } with issues
Submitted: 13 Mar 2015 10:14 Modified: 15 Mar 2017 7:00
Reporter: schte bo Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.3.4, 8.0.28 OS:Windows (2012 R2)
Assigned to: CPU Architecture:Any

[13 Mar 2015 10:14] schte bo
Description:
Hi,
unzip mysql-connector-odbc-noinstall-5.3.4-win32.zip & start install.bat
Open %windir%\syswow64\odbcad32.exe and add System DSN 
MySQl ODBC 5.3 ANSI Driver or
MySQl ODBC 5.3 UNICODE Driver
(both have the issue)
insert your credentials and try to click "Test" to verify your inputs.

If your password contains 

}

and something following, you will always get the error message:

Connection Failed
[Microsoft][ODBC Driver Manager] Invalid Connection string Attribute:

Here are some examples:
Password works fine: lMnB7!45H48G
Password works fine: 123465}

Password with issues: lMnB7}45H48G
Password with issues: 123465}1

How to repeat:
Please see description
[13 Mar 2015 14:40] Chiranjeevi Battula
Hello schte bo,

Thank you for your feedback.
Verified this behavior on MySQL Connector/ODBC 5.3.4 to add System DSN. 

Thanks,
Chiranjeevi.
[13 Mar 2015 14:41] Chiranjeevi Battula
screenshot

Attachment: 76310.PNG (image/png, text), 58.29 KiB.

[14 Mar 2017 16:00] Kevin Zou
repeatable in 5.3.7 mysql connectors. Please fix
[14 Mar 2017 17:14] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=85450 marked as duplicate of this one.
[15 Mar 2017 7:00] Bogdan Degtyariov
Unfortunately, the curly braces symbols cannot be used in the passwords.
The ODBC driver manager would not allow that even if such possibility exists for the passwords set to MySQL Server users.
Please note it is not a limitation of MySQL ODBC Driver, but the Windows ODBC Driver Manager.

You can check the password recommendations here:
https://msdn.microsoft.com/en-us/library/ms161962(v=sql.100).aspx

In particular this paragraph:
... (quote)
If used in an OLE DB or ODBC connection string, a login or password must not contain the following characters: [] {}() , ; ? * ! @. These characters are used to either initialize a connection or separate connection values. 
...
[8 Jun 2017 9:41] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=86618 marked as duplicate of this one.
[8 Jun 2017 10:05] Gregory Finlayson
if its not a bug, is it a feature?
[12 May 2021 15:48] Pierre le Riche
SQL Server ODBC connection strings do support all printable characters inside passwords, including closing curly braces. The trick is to wrap the password inside curly braces and to double all closing curly braces inside the password.

The MySQL ODBC driver supports opening and closing curly braces to encapsulate a password using special characters, but it does not understand that a doubled closing curly braces implies that the password contains a single closing curly brace.

Please fix this.
[16 Mar 2022 14:50] MySQL Verification Team
Bug #106631 marked as duplicate of this one.