Bug #68305 MySQL Workbench ignores entered username if connection username preset blank
Submitted: 7 Feb 2013 18:15 Modified: 27 Aug 2014 3:01
Reporter: Matthew D Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.46 OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: Default Entry, Preset Username, workbench

[7 Feb 2013 18:15] Matthew D
Description:
If the preset username is cleared in the connection profile, the UI prompts for username/password as expected. Upon entry of username/password and initiated connection, it fails due to inability to connect on default username(ODBC/etc.) instead of using the provided username/password.

The workbench should attempt connection using the provided username/password rather then defaulting to anon one.

Error message:
11:58:44 [DB1][ mforms backend]: Looking up password for ''@'Mysql@localhost:3306' has failed 
11:58:44 [DB1][ mforms backend]: Forgetting password for ''@'Mysql@localhost:3306 
'Creating and showing password dialog 
11:58:46 [ERR][ WQE backend]: Got an exception during connection: Access denied for user 'ODBC'@'localhost' (using password: YES) 
11:58:46 [ERR][ WBContext]: SQL editor could not be connected: Access denied for user 'ODBC'@'localhost' (using password: YES)Your connection attempt failed for user '' from your host to server at localhost:3306: 
Access denied for user 'ODBC'@'localhost' (using password: YES) 

Please: 
1 Check that mysql is running on server localhost 
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed) 
3 Check the has rights to connect to localhost from your address (mysql rights define what clients can connect to the server and from which machines) 
4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host address you're connecting from

How to repeat:
1. Clear preset username in connection manager
2. Attempt query connection or administration
3. Enter valid username/password and submit
4. Presented with error message

Suggested fix:
MySQL Workbench should use the provided username/password with connection rather than the default one.

Maintain default/anonymous preset if username/password submitted is blank.
[7 Feb 2013 18:30] MySQL Verification Team
Thank you for the bug report.
[15 Jan 2014 9:31] Hubert ADGIE
Is there any chance to get this corrected ?
[26 Aug 2014 21:46] Armando Lopez Valencia
Posted by developer:
 
*FIXED*
*Verified in:*
Windows 7x64
Windows 8.1x64
Ubuntu 12.04x64
MySQL Server 5.6
WB 6.2.2.12203
A message indicating that the user name is missing is displayed.
The connection succeed as soon as the user name is entered.
[27 Aug 2014 3:01] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.2.2 release, and here's the changelog entry:

Empty user names are no longer allowed.

Thank you for the bug report.