Bug #91943 MySQL Workbench giving "Bad Handshake" for certain versions of MySQL server
Submitted: 9 Aug 2018 6:23 Modified: 9 Aug 2018 9:55
Reporter: Brent Saner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.12 build 13312926 CE OS:Linux (Arch Linux)
Assigned to: CPU Architecture:x86 (x86_64)

[9 Aug 2018 6:23] Brent Saner
Description:
When connecting to certain versions of MySQL servers, MySQL Workbench gives a "bad handshake" error (despite these connections working fine in previous versions).

Seems to be a regression. Please refer to bug #75745 (https://bugs.mysql.com/bug.php?id=75745).

I get it when using 8.0.12 build 13312926 CE on Arch Linux (with libmariadbclient 10.1.34-1) when connecting to a mysql server instance 14.14 Distrib 5.1.73 on CentOS 6.5 (mysql-server-5.1.73-8.el6_8.x86_64).

This same connection was working fine on Workbench 6.3.10.

The error is immediate (or rather, after about 0.5s - presumably during the initial connection transaction).

I do NOT get it:

- using the mysql CLI to the same server as above from the same client machine (Arch Linux, mariadb-clients 10.1.34-1)

- when using PyMySQL 0.9.2 to the same server as above from the same client machine

- when connecting to a more recent (compat.) version, Ver 15.1 Distrib 10.1.32-MariaDB (mariadb101u-server-10.1.32-1.ius.centos7.x86_64 from the IUS repository on CentOS 7.5.1804)

How to repeat:
1.) Configure a connection in Workbench to a 5.1.x server (and possibly 5.6.x as well, based on other comments at #75745)

2.) Get a "bad handshake" error.
[9 Aug 2018 6:23] Brent Saner
mysql-workbench --log-to-stderr output (scrubbed)

Attachment: stderr.log (text/x-log), 2.93 KiB.

[9 Aug 2018 6:23] Brent Saner
stack trace (scrubbed)

Attachment: strace.out (application/octet-stream, text), 22.07 KiB.

[9 Aug 2018 7:19] Mike Lischke
Brent, please keep in mind that MySQL Workbench is a *MySQL* tool, made for *MySQL* servers. It's not tested with any other server like MariaDB and we give no support for such scenarios.

Try to reproduce the problem with a MySQL server and send us the log then. We will try to find the reason, if that's necessary.
[9 Aug 2018 7:22] Brent Saner
Mike, please re-read.

Per my initial comment, the issue *does NOT* occur on MariaDB servers.

It is occurring on MySQL servers.
[9 Aug 2018 7:26] Mike Lischke
Well, libmariadbclient is involved here, which might be a part of the problem. Please try libmysqlclient instead. It could well be the latest cppconnector no longer works with the MariaDB client (which it never was supposed to). Also try a supported server version (5.5, 5.6, 5.7 or 8.0).
[9 Aug 2018 8:22] MySQL Verification Team
Changing to Need Feedback for last's Mike comment.
[9 Aug 2018 9:55] Brent Saner
Yeah, I'm closing this.

As stated, it worked fine on the previous release to the same DB.

The entire problem is that it isn't working with a 5.1 server, and I can't change the server to a newer version. So 5.5+ is out. Though, worth a note, you may want to check the x-ref'd bug, because there's people still reporting the same exact issue on 5.6 less than 24 hours ago.

I'll just use a different tool since it's apparent nobody actually wants to fix this.
[3 Oct 2018 8:47] hugeng chandra
Is there any workaround for this bug?
[6 Oct 2018 13:58] Brian Stephenson
Also affecting me after recent upgrade to Workbench v8 (bad handshake when I try to connect to server 5.1.17). Will upgrade my server to v 5.5 but need to connect before change to do a backup so desperately NEED A WORKROUND first. Please anybody - help!
[6 Oct 2018 18:41] Mike Lischke
Use an older Workbench version. You can download 6.3 from the archives at https://downloads.mysql.com/archives/workbench/.
[7 Oct 2018 14:31] Brian Stephenson
Thanks for the advice. In fact I had already downgraded to Workshop v 6.1 and the connection was fine. However, I was unable to connect to Server v8 on my local machine from workshop 6.1 so had to downgrade to server v 5.5. All now working so many Thanks. Brian