Bug #81895 Error when connecting through an SSH connection without storing the DB password
Submitted: 16 Jun 2016 22:25 Modified: 6 May 2017 14:54
Reporter: Sergio Bobillier Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.3.8 Build 1228 CE (64 bits) OS:Ubuntu (16.04)
Assigned to: CPU Architecture:Any
Tags: Connection, ssh, workbench

[16 Jun 2016 22:25] Sergio Bobillier
Description:
When connecting through a TCP Over SSH Connection MySQL Workbench is giving an error when connecting to the DBMS if the DB password is not stored in the Keychain.

In the Workbench log you can see these errors:

Exception: Access denied for user 'basket'@'localhost' (using password: NO)

And then

Exception: Can't connect to MySQL server on '127.0.0.1' (111)

Seems like MySQL Workbench tries to authenticate without a password, realizes that the user needs a password, asks for it but then becomes unable to connect to the server for no reason.

However if you store the database password in the Keychain this doesn't happen.

This is not a critical bug since you can still connect to the database, however for security reasons I rather not store my passwords, I prefer to type them each time.

How to repeat:
1 Create a TCP Over SSH Connection, fill in all the details but do not set a password for the database user.

Note: The MySQL User MUST have a password or the error won't occur.

2. Try to connect to the DBMS

-- MySQL Workbench will say that it cannot connect to the database server.

3. Edit the connection and store the correct Database Password in the Keychain.

4. Try to connect again.

-- MySQL Workbench should connect correctly.
[16 Jun 2016 22:26] Sergio Bobillier
MySQL Workbench log file.

Attachment: wb.log (text/x-log), 4.63 KiB.

[22 Oct 2016 0:42] MySQL Verification Team
Please try version 6.3.8. Thanks.
[22 Nov 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[22 Nov 2016 13:08] Sergio Bobillier
Tried with MySQL Workbench 6.3.8 Build 1228 CE (64 bits). Exactly the same behavior.
[6 Apr 2017 14:54] MySQL Verification Team
Please try version 6.3.9. THanks.
[7 Apr 2017 22:36] Adrian Sausenthaler
Affects me too. Did some research.

Workbench: Version 6.3.9 Build 10690321 @Arch Linux 64bit
Mysqld: 5.5.54-0ubuntu0.14.04.1

-> Didn't store any password for ssh or mysql-db
-> Connecting over external TCP-forwardings from localhost to server works perfeclty
-> In WB connecting with method "TCP over SSH" doesn't work. Neither with SSH password auth nor with SSH-Keys.

Research: Didn't activated any extra MySQL-Logs. Instead i used tcpdump on interface "lo" on server and it showed up the problem:
denied for user 'root'@'localhost' (using password: NO)

The password is not being transmitted even though i entered the db password for the user.
[1 May 2017 16:21] Matt Thompson
This also affects me on Windows 10 against various server versions, including 5.7. The server and workbench logs clearly show it never attempts to reconnect with the password.

MySQL Workbench Commercial (Proprietary) for Windows version 6.3.8 SE build 1229 (64 bit)
[7 May 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".