When starting a new connection to MySQL database, all database credentials are correct, then you get an error saying “Bad Handshake when trying to connect”.

This is likely because of the version mismatch of MySQL server that leads to the failed authentication. You are either:

  • Using an old version of MySQL on your client to connect to the server with a newer MySQL version.
  • Using a new version of MySQL on your client to connect to the server with an old MySQL version.

The newer MySQL versions might use a different protocol for the connection, thus causes the bad handshake issue when there’s a version mismatch. For example, using MySQL 8.0 on your local environment might not be able to connect to the server using MySQL 5.7.

To solve this problem, you should:

  • Check the versions of both your local and remote server, then install the same version on both environments.
  • Use a client that supports multiple versions of MySQL to avoid the risk of updating the server and potentially damaging data.

TablePlus includes multiple MySQL binaries in the GUI client so you should be able to connect to any the MySQL server of any versions.

MySQL multiple versions

That should fix the problem now.

Need a good GUI tool for databases? TablePlus provides a native client that allows you to access and manage Oracle, MySQL, SQL Server, PostgreSQL, and many other databases simultaneously using an intuitive and powerful graphical interface.

Download TablePlus for Mac.

Not on Mac? Download TablePlus for Windows.

On Linux? Download TablePlus for Linux

Need a quick edit on the go? Download TablePlus for iOS

TablePlus in Dark mode