Cannot connect to MySql v8.0.46

sander_bouwhuis's profile image sander_bouwhuis posted 3 weeks ago in General Permalink

I have used HeidiSQL for more than a year without problems. This morning the MySql server instance in Google Cloud was upgraded to MySql v8.0.46, and now I can no longer connect to the server. I get this: Connection failed SSL connection error: unknown error number

Interestingly enough, TablePlus also cannot connect anymore.

However, I can connect my own application via ODBC without problem. Also, MySql Workbench can also connect without a problem.

What is going on? How can this be fixed?

sander_bouwhuis's profile image sander_bouwhuis posted 3 weeks ago Permalink

I found a workaround: I can set 'Certificate verification' to 'No verification (insecure)'. Clearly, that does not sound secure.

Can this bug be fixed please?

ansgar's profile image ansgar posted 3 weeks ago Permalink

Do you pass any of the SSL certificate files to the connection? If the fields are empty, then selecting "No verification" should not be more unsafe than anything else.

You should also try out the other libmysql and libmariadb options in the library dropdown.

sander_bouwhuis's profile image sander_bouwhuis posted 3 weeks ago Permalink
  1. Of course I provide the SSL key + cert. Without them I wouldn't be able to connect to the server.
  2. libmariadb.dll - works, but only in 'No verification (insecure)' mode.
  3. libmysql-6.1.dll - doesn't work at all.
  4. libmysql-8.4.0.dll - works, but only in 'No verification (insecure)' mode.
  5. libmysql-9.4.0.dll - doesn't work at all.
  6. libmysql.dll - doesn't work at all.
ansgar's profile image ansgar posted 3 weeks ago Permalink

Ok, then some more things you may try out:

  • latest v13 preview version from the download page
  • copy libmysql.dll from a Windows MySQL version to your HeidiSQL folder (renamed so you can find it afterwards). HeidiSQL provides it in the library dropdown.
gary.futch66's profile image gary.futch66 posted 3 weeks ago Permalink

The fact that Workbench and the ODBC connection still work is a pretty strong clue that the server itself is fine. Since HeidiSQL and TablePlus both started failing immediately after the Google Cloud MySQL upgrade, I'd look at the TLS/certificate validation side rather than the username/password or network connection.

The fact that disabling certificate verification makes HeidiSQL connect is especially telling. It suggests the connection is reaching the server, but the client library doesn't like something about the certificate chain, hostname, CA, or the newer TLS requirements.

I'd first check exactly which CA certificate you're using and whether it is still the CA Google Cloud expects for the upgraded instance. Also worth testing the different client libraries in HeidiSQL, as you've already started doing. If libmariadb and newer libmysql builds only work with verification disabled, that points more toward a client-library/certificate-validation compatibility issue than a server outage.

I wouldn't leave verification disabled permanently just to get around it. If this is a certificate-chain or client-library compatibility problem, updating HeidiSQL or replacing the bundled MySQL client DLL with a compatible version should be preferable.

And if this turns out to have caused any actual MySQL data corruption during the upgrade/recovery process, make a backup/copy of the affected database before attempting repairs. For damaged MySQL databases, Stellar Repair for MySQL can be useful as a recovery option, but it wouldn't be my first step for this particular SSL connection problem.

sander_bouwhuis's profile image sander_bouwhuis posted 3 weeks ago Permalink

I downloaded the v13 preview (see screenshot). But, I immediately encounter multiple problems:

  1. The version still says it is v12.21.1.1 instead of v13.x
  2. I am missing all of my sessions. There should be 19 servers.
  3. The text looks extremely bad. It is almost unreadable. There seems to be a bug in the rendering of fonts.
1 attachment(s):
  • 2026-09-28-19-18-51-HeidiSQL_12.21.1.1_-_Session_manager
ansgar's profile image ansgar posted 3 weeks ago Permalink

Yes.

  • please ignore the wrong version 12.21.x number
  • sessions are stored in a JSON file in that build. You need to export from your classic Windows HeidiSQL 12.21 version to a txt file, then import here again. (Note this will be enhanced in the future with a direct import from registry)
  • text looks normal on your screenshot to me. Probably set More > Preferences > General > Theme > Light (?)
sander_bouwhuis's profile image sander_bouwhuis posted 2 weeks ago Permalink
  1. I tried with the v13 version, but I have the same problem. One thing to note: I supply the key and cert. Is this maybe caused by not supplying a CA cert? In none of the applications I use to connect to any database type have I ever supplied a CA cert (only the server's cert and key).

  2. Another problem with the v13 version is that I can no longer connect to SQL Server. It claims named pipes are no longer supported and that I should switch to TCP/IP. But, when I select that I get this error message:

    Connection failed
    SQL Error (0): TMSSQLConnection : Error 20009 : 
    Unable to connect: Adaptive Server is unavailable or does not exist (localhost)
ansgar's profile image ansgar posted 2 weeks ago Permalink

Well it was worth the test. The connection code is basically the same, but in your case there is obviously something specific missing with the SSL mode. You could probably create a ticket for that SSL thing.

Please login to leave a reply, or register at first.