Connecting to AWS RDS (MySQL 8.0) fails from HeidiSQL 12.8

AlexPresland's profile image AlexPresland posted 2 months ago in General Permalink

I'm trying to investigate an issue where if I upgrade from HeidiSQL 12.7.0.6850 to 12.8.0.6908 then connecting to an AWS RDS running MySQL 8.0.35 stops working. If I downgrade HeidiSQL it starts working again. This happens on both Windows 10 and Windows 11, although to generate the logs for this post I'm now using 12.7 on Win 10 and 12.8 on Win 11.

All other MariaDB and MySQL connections that I use seem to work fine on both versions.

The symptoms that I get are that I click "Open" in the SessionManager and HeidiSQL seems to just hang. I've left it sitting there for over 10 minutes, but it just continues to hang. Clicking "Cancel" appears to do nothing and the window then gets "(Not Responding)" in the title. The only way I can close down HeidiSQL is to right-click the icon on the Taskbar and select "Close window".

Enabling debug logging doesn't show anything additional of value, so I'll stick to the non-debug log levels here...

When it is working (HeidiSQL 12.7) I get:

/* 2024-10-06 12:03:10 [] */ /* Delimiter changed to ; */
/* 2024-10-06 12:03:10 [] */ /* Writing to session log file now: C:\Users\REDACTED\AppData\Roaming\HeidiSQL\Sessionlogs\001232.log */
/* 2024-10-06 12:03:39 [VolunteerDev@AWS] */ /* Connecting to vol.REDACTED.eu-west-1.rds.amazonaws.com via MariaDB or MySQL (TCP/IP), username REDACTED, using password: Yes ... */
/* 2024-10-06 12:03:39 [VolunteerDev@AWS] */ /* SSL parameters successfully set. */
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SELECT CONNECTION_ID();
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SHOW VARIABLES;
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ /* Characterset: utf8mb4 */
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SHOW /*!50002 GLOBAL */ STATUS;
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SELECT NOW();
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ /* Connected. Thread-ID: 36456974 */
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ /* Reading function definitions from C:\Program Files\HeidiSQL\functions-mysql8.ini */
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SHOW TABLES FROM `information_schema`;
/* 2024-10-06 12:03:40 [VolunteerDev@AWS] */ SHOW DATABASES;

When it hangs (HeidiSQL 12.8) I get slightly sporadic results because the Session logs seem to becom truncated at different points. The most I've got is:

/* 2024-10-06 12:17:55 [] / / Delimiter changed to ; */
/* 2024-10-06 12:17:55 [] / / Writing to session log file now: C:\Users\REDACTED\AppData\Roaming\HeidiSQL\Sessionlogs\000005.log */
/* 2024-10-06 12:20:53 [VolunteerDev@AWS] / / Connecting to vol.REDACTED.eu-west-1.rds.amazonaws.com via MariaDB or MySQL (TCP/IP), username REDACTED, using password: Yes ... */
/* 2024-10-06 12:20:53 [VolunteerDev@AWS] / / SSL parameters not fully set. Result:

Any tips on how to investigate this further and what additional information would be useful to include in a subsequent bug report?

AlexPresland's profile image AlexPresland posted 2 months ago Permalink

Following up on the last log entry about SSL parameters not being fully set, I've found that there's a new "Certificate verification" option. Further testing shows that turning this down to "No verification (insecure)" makes no difference - it still hangs.

Turning off SSL completely makes it work, but that doesn't seem like a good idea.

ansgar's profile image ansgar posted 2 months ago Permalink

Have you tried other libraries provided in the "Library" drop-down of the session manager?

In the v12.8 release notes you see I fixed some MySQL/SSL things, and also provide a new libmysql-8.4.dll .

AlexPresland's profile image AlexPresland posted 2 months ago Permalink

Thanks for the quick follow-up. I hadn't tried changing the "Library" drop-down. It connects without issue using your new libmysql-8.4.0.dll library! :-)

Just in case it helps you, here is the behaviour for the 4 library options:

  • libmariadb.dll = Crashes HeidiSQL (as reported above)
  • libmysql-6.1.dll = Connection fails with "SSL connection error: unknown error number"
  • libmysql-8.4.0.dll = Connects without issue :-)
  • libmysql.dll = Connection fails with "SSL connection error: unknown error number"

Thanks again...

AlexPresland's profile image AlexPresland posted 2 months ago Permalink

Sorry... another note is that I also had to change the "Certificate verification" setting under the SSL tab to "No verification (insecure)".

ansgar's profile image ansgar posted 2 months ago Permalink

With the higher verification setting, did the server return a reasonable error message? HeidiSQL checks the returned message on a failed connect, and if it contains certificate verification, HeidiSQL should hint you with a message like

You might need to lower the certificate verification in the SSL settings.

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