Bug #105475 Cannot connect to Azure MySQL
Submitted: 5 Nov 2021 18:06 Modified: 18 Nov 2021 16:29
Reporter: Michael Misiaszek Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:8.0.27 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[5 Nov 2021 18:06] Michael Misiaszek
Description:
I cannot connect to Azure MySQL with mysql.exe or mysqldump.exe

How to repeat:
Try to connect using connection string

Suggested fix:
Downgrade to version 8.0.26
[9 Nov 2021 12:40] MySQL Verification Team
HI Mr. Misiaszek,

Please contact your Azure administrators.

If they are offering MySQL services, they know a procedure on how to access it ......
[9 Nov 2021 12:42] MySQL Verification Team
Hi,

Also, if you do not succeed in connecting to our server with proper instructions, make sure you are using correct user, password, default schema and default encryption algorithm.
[9 Nov 2021 16:39] Michael Misiaszek
Hi, I am the Azure administrator and I do know how to connect to it. I believe there is a bug with the software that I am still experiencing. Each day I have to reinstall Workbench to the previous version to connect to MySQL in Azure. Please give us an option to turn off auto updates! NOTE: As I stated before, I can connect if I downgrade the workbench, meaning that I know how to connect to the Azure MySQL.
[10 Nov 2021 12:26] MySQL Verification Team
Hi,

Regarding the option for auto-updates, I am afraid that it is not a bug in the software, at all. 

There is no mention of auto-updates being mandatory in the manual for the WorkBench.
[10 Nov 2021 16:55] Michael Misiaszek
Nevertheless, The issue still persists where mysql.exe and mysqldump.exe will not connect to Azure MySQL databases. The only way I can connect is to downgrade MySQL Workbench (EACH DAY).
[11 Nov 2021 13:07] MySQL Verification Team
Hi,

We shall try to find somebody who could help you ......
[11 Nov 2021 13:12] MySQL Verification Team
HI,

Can you, please try re-installing the Workbench with the Installer for Windows, but when doing so, try disabling auto-updates.
[11 Nov 2021 15:57] MySQL Verification Team
Hi Mr. Misiaszek,

We have investigated with the Development teams that work on the products that you mention. The problem does not seem to be with our software, not even with MySQL Installer for Windows.

It doesl depend a bit  on how Workbench was initially installed, but there is nothing as far as we know that would automatically upgrade a version without the users consent. MySQL Installer does detect new versions and prompts the users about them, but the users have to install the new versions whenever they feel is right.

Hence, no MySQL product upgrades itself without the user consent.

The fact that your user can not login with mysql.exe nor with mysqldump.exe, means that there could be another problem. The upgrade process between the releases of the server can take some time, especially on Windows, depending also on load etc ...

Hence, may be you can not login with mysql.exe since the server is busy ...... that could be found in the error log. 

You should also check whether upgrade occurs over the same tree and same directory as with the previous release.

This does not seem to be our problem, but we will have to investigate few more options before we can be 100 % sure. We do care that your customers are happy with our products.
[11 Nov 2021 18:35] MySQL Verification Team
Hi Mr. Misiaszek,

We have taken a last and definitive look at what might cause the problems.

It is quite possible that, you at Microsoft Azure, are  using the MySQL Installer command line interface in a script to do so, and you are upgrading ALL products with such a script. Instead of it doing in such a manner,  you  can specify a list of products to upgrade instead. 

That would solve your problems, but you will first have to locate the script that you wrote.

This is a final analysis from us. Let us know if it helped you.
[11 Nov 2021 19:09] Michael Misiaszek
Thank you for looking into this further. Please not the following environment. Azure MySQL is setup with the Azure portal and set to version 8. No install scripts are used unless done by Microsoft. Nor are there any scripts used to connect to MySQL in Azure, as I'm only using command line to connect. My assumption would be that this version of mysql.exe would not work with any MySQL server regardless of location. Also note that this is happening to other co-workers (we all work from home so different networks too). I am testing with the following command: 

Does not work with mysql.exe 8.0.27 and does work with 8.0.26
mysql -u <user>@<mydb> -p --ssl-mode=required -h <mydb>.mysql.database.azure.com

However, this command does work with both versions (removing --ssl-mode=required):
mysql -u <user>@<mydb> -p -h <mydb>.mysql.database.azure.com

Keep in mind that I have to switch back to mysql.exe to version 8.0.26 EACH DAY. Some how it keeps upgrading itself to 8.0.27. I keep a backup of mysql.exe and mysqldump.exe for this purpose.
[12 Nov 2021 12:55] MySQL Verification Team
Hi Mr. Misiaszek,

Here are our last findings.

First of all, you are first one to report about automatic upgrades of our software, including any executables. Nobody else ever reported a case where their MySQL installations upgraded automatically, without the consent of the user. This is not possible, at all, without some script that is written by Azure programmers or administrators. Hence, you have to locate that script and what triggers it to run every day. On Unix, it is very easy to find that script. It is either in the cron or schedule script. On Windows, there is Task Scheduler, so please look at its setup very carefully.

Regarding mysql.exe not running with SSL that is required, it is easy to explain. Please, go to dev.mysql.com, to Release Notes for 8.0.27 and you will see exactly which SSL library to upgrade and to which version.

It is recommendable that release notes are read for each new release that you install.

Do note, once again, that this is not a bug in MySQL. Hence, we have done free support here, which we are not allowed to. If you are interested in MySQL Support options, please, let us know .....
[12 Nov 2021 17:24] Michael Misiaszek
I am sorry for the confusion. It is not MySQL Server that is upgrading by itself. MySQL client in the Workbench is upgrading by itself. I still feel there is a bug in the mysql.exe and mysqldump.exe as they hang when trying to connect via the ssl flag. They give no errors - just hang. If I downgrade the mysql.exe CLIENT back to 8.0.26, it works fine.
[15 Nov 2021 13:08] MySQL Verification Team
Hi Mr. Misiaszek,

We have millions and millions of installations running our client software. Nobody in our company has had any reports about client programs upgrading themselves !!!!!! If there was anything like that, be sure that we would have known.

Also, do note that change in SSL library is a sufficient reason that new client programs do not work when encryption is required.
[15 Nov 2021 15:48] Michael Misiaszek
Well, I can tell you that I have completely uninstalled the MySQL Workbench and removed the MySQL Community installer. Then I installed the Community installer and INTENTIONALLY
[15 Nov 2021 15:53] Michael Misiaszek
Well, I can tell you that I have completely uninstalled the MySQL Workbench and removed the MySQL Community installer. Then I installed the Community installer and INTENTIONALLY installed MySQL Workbench 8.0.26 version. I verified the install with mysql.exe -V and it states 8.0.26. However, the next day, without fail, the mysql.exe -V reports 8.0.27. But since I am the only one reporting this I'm sure it is not the truth. So you can call me a liar - but this is what I'm experiencing. 

NOTE: The original bug is still a problem for me whether or not you wanna believe that too. mysql.exe version 8.0.27 hangs when trying to connect to Azure MySQL. However, mysql.exe version 8.0.26 does not PERIOD. Bug Reported!
[15 Nov 2021 16:02] MySQL Verification Team
Hi Mr. Misiaszek,

We believe you that you are telling the truth.

However, most of us have MySQL client programs running on Windows and none of our installations has automatic upgrade.

Also, developers of all of our client programs on Windows , as well as developers of MySQL Installer, have been fully consulted on this issue and they all claim that we do not have such a feature at all. Hence, we are urging you, once again, to look at Windows Task Scheduler or in some program or script, running on your Azure platform.

If we can not repeat the behaviour and if the entire Development team can not find such a feature in relevant programs, then there is nothing further that we can do for you .......

So, please, do what we recommended above .....
[18 Nov 2021 0:02] Michael Misiaszek
You are completely missing the issue here. This has nothing to do with Azure other than that is where my Database is. The issue here is with MySQL Workbench NOT MySQL Server. Again I installed MySQL workbench (version 8.0.20-winx64.msi) yesterday on my local computer. Today (meaning the day after I installed version 8.0.20), MySQL Workbench is now 8.0.27 and mysql.exe is also version 8.0.27. NOTE: This is on my local machine and NOT in Azure. I highly recommend forgetting about Azure for the moment and focus on the issue at hand.
[18 Nov 2021 5:27] MySQL Verification Team
The installer used to have some catalogue updater run via task scheduler at 11pm or midnight. Don't know if it's still like that, or if it actually upgraded anything.

Nonetheless,  one can monitor mysql.exe with ProcMon to figure it out.

https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

Can you try this one night?
[18 Nov 2021 12:51] MySQL Verification Team
Hi,

We did understand fully what you were writing about and we did ask you to check Task Scheduler settings on your Windows.
[18 Nov 2021 16:29] Michael Misiaszek
I have found the reason why the Workbench keeps upgrading. We have MangeEngine Patch Manager Plus monitoring all machines and the Workbench 8.0.27 was pre-approved for installation. Nevertheless, I have removed it from the approval and it will not be installed again. I have since reinstalled 8.0.26, which does work for me. However, I still think there is a bug with 8.0.27 with my connection string. NOTE: I cannot connect with or without SSL from the previous examples. mysql.exe and mysqldump.exe just hang after password and never change state (from command line). Also note that the Workbench hangs as well and never connects.
[19 Nov 2021 13:25] MySQL Verification Team
Hi Mr. Misiaszek,

We are glad that we were right from the start.

Hence, that was not our bug and this entire correspondence was a free support. Do consider getting a proper MySQL support for your customers, since this is a forum for the repeatable bug reports and NOT for the free support. We do not provide free support.

Regarding SSL, we have already notified you that you need to upgrade your SSL library to the one described in the Release Notes for 8.0.27.