Bug #105288 8.0.27: Connecting to Azure MySql instance hangs
Submitted: 21 Oct 2021 13:25 Modified: 16 Apr 2022 14:26
Reporter: Shane Troughton Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.27 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: WBBugReporter

[21 Oct 2021 13:25] Shane Troughton
Description:
Not really sure what the issue is as there is no useful information logged anywhere but.

When I installed 8.0.27, I am unable to connect to Azure MySQL instances anymore.
Uninstalled 27, downgraded to 26 and it works fine.

Nothing special about the connections or anything like that so not sure.
Test Connection just hangs there continuously until manually terminated.
Connect again just hangs there continuously and doesn't connect or time-out.

Only work-around I've found so far is to downgrade.

How to repeat:
Not sure if it happens on every Azure instance but on the two we are using it refuses to connect.

Simply try to connect, test-connection and it just spins indefinitely.

Suggested fix:
Unknown
[21 Oct 2021 14:43] MySQL Verification Team
Thank you for the bug report. You are having to connect using which client?.
[27 Oct 2021 17:49] Nikki Aaron
My colleagues at work and I have the same issue. Connecting to Azure MySQL database through MySQL Workbench after updating to 8.0.27 hangs. Downgrading to 8.0.26 works fine.
[27 Oct 2021 20:46] Shane Troughton
Connecting to Azure MySql db using 8.0.27 doesn't work.
Had to downgrade to get it to work.
[28 Oct 2021 18:14] Mike Hancock
This bug cost me about an hour today until I discovered it was the workbench version.

Same symptoms as the above. Nothing in logs.

We're this happens with all out Azure MySQL connections. We connect using RBAC accounts so username is AAD email + MySQL instance ID. E.g. bob@email.com@azure-instance-01

Password is an access token sent with Cleartext plugin enabled.

SSL connection required.

Just hangs. Can crash if you use "test connection"

Writes nothing to logs even with debug on so my assumption at the moment is this is caused by something in the auth changes made in 8.0.27.
[31 Oct 2021 10:41] Steven Rombauts
I'd like to add that the same problem happens for me on non-Windows OS too. I tried mysql 8.0.27 command line client on different Linux and macOS machines, and it just hangs. No errors, it just keeps hanging with high CPU usage. 

I also tried with different Azure MySQL instances with and without requiring SSL, but the same thing keeps happening. 

Everything works fine with 8.0.26
[1 Nov 2021 2:01] Makoto Oda
I run into the same problem.

I am using Windows 10 Pro (Version 2004 OS Build 19041.685).
And I confirmed the symtons like below.

- I can connect to Azure Database for MySQL (Version 8.0.15) using mysql 8.0.26 and MySQL Workbench 8.0.26.
- However, I cannot connect to the same database using mysql 8.0.27 and MySQL Workbench 8.0.27.

I have posted to stack overflow about this.
https://stackoverflow.com/questions/1231900/mysql-load-data-local-infile-example-in-python
[2 Nov 2021 8:08] MySQL Verification Team
Bug #105397 marked as duplicate of this one.
[2 Nov 2021 18:18] David Wellman
Have tested all the following. Web Apps appear to be unaffected (tested PHPMyAdmin)

OS	        From    	Version 	Worked
RedHat 8.2	Azure VM	mysql 8.0.21	Yes
MacOS 10	remote  	mysql 8.0.25	Yes
Windows 10	remote  	mysql 8.0.25	Yes
Ubuntu 20.04	Azure VM	mysql 8.0.26	Yes
PHPMyAdmin	remote  	mysql 8.0.27	Yes
Ubuntu 20.04	Azure VM	mysql 8.0.27	No
Ubuntu 20.04	remote  	mysql 8.0.27	No
Windows 10	remote  	mysql 8.0.27	No
Windows 10	remote  	MySQL Workbench 8.0	No
[8 Nov 2021 17:21] Michael Nichols
Same issue here with MySQL client on Ubuntu 20.04
[13 Nov 2021 8:33] Sil M
Same here on Ubuntu 21.10
[13 Nov 2021 9:53] Makoto Oda
I've posted wrong url about the stack over flow post. The correct url is https://stackoverflow.com/questions/69764355/the-response-is-not-returned-from-azure-datab... .
[12 Jan 2022 10:15] MaibornWolff GmbH
We experience the same issue on all Ubuntu LTS servers and macOS clients.
Is there any news to this issue?
[14 Jan 2022 16:21] Skylar Sutton
I have confirmed my use case with long running stored procedures leading to the dead connections also exists in 8.0.26... going back to 8.0.25 does resolve it though. Maybe they are related, maybe it's something different. Either way, documenting in case it helps.
[14 Jan 2022 16:27] Laurent Pi
The MySQL CLI 8.0.27+ is not compatible anymort with Azure MySQL Database.
Here's Microsoft statement

> The MySQL 8.0.27 client is incompatible with Azure Database for MySQL - Single Server. All connections from the MySQL 8.0.27 client created either via mysql.exe or workbench will fail. As a workaround, consider using an earlier version of the client (prior to MySQL 8.0.27) or creating an instance of Azure Database for MySQL - Flexible Server instead.

https://docs.microsoft.com/en-us/azure/mysql/concepts-compatibility#mysql-drivers

No comment ...
[19 Feb 2022 1:00] Michael Nichols
Are there any plans to fix this?

Azure MySQL flexible server is not a great option as it doesn't support geo-redundant backup to another region.
[23 Feb 2022 20:50] Mike Hancock
As an update, Microsoft seem to have a fix rolling out for this. Unfortunately there isn't much information on how quickly that fix will be rolled out other than it's a "February 2022" update:

"The MySQL client version 8.0.27 or later is now compatible with Azure Database for MySQL - Single Server. Now you can connect form the MySQL client version 8.0.27 or later created either via mysql.exe or workbench."

Source: https://docs.microsoft.com/en-us/azure/mysql/single-server-whats-new

My understanding is that these updates are rolled out gradually and it's difficult to really know when your instances will receive the updates but I'd be surprised if this isn't resolved for all users in the next couple of weeks. I've reached out to Microsoft to see if they can clarify on the "liveness" of the fix.
[16 Mar 2022 13:51] MySQL Verification Team
Bug #105581 marked as duplicate of this one.
[16 Mar 2022 14:00] Mike Hancock
After reaching out to Microsoft from my comment on 23rd February, the fix was removed from the linked release notes.

They have since returned, under the March release.

Phased rollout - based on the above dupe ticket this is still an issue in the Gov Azure regions.

I can confirm that my instances in UK South are fixed an I can connect with Workbench 8.0.28 without issue.
[16 Mar 2022 14:26] MySQL Verification Team
Hello Mike Hancock,

Thank you for confirming that issue is no longer seen on MySQL Workbench 8.0.28.

Shane Troughton, 
Please try MySQL Workbench 8.0.28 and report us back if issue persist even in 8.0.28 along with unaltered error log. Thank you.

Regards,
Ashwini Patil
[16 Mar 2022 14:36] Michael Nichols
I can also confirm this has been fixed in client version 8.0.28 for both Linux and Windows and version 8.0.28 of various client libraries (PHP, Python, etc.)
[17 Apr 2022 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".