Score:0

Unable to connect to Azure MySQL from Ubuntu 20.04

uz flag
mysql -h foobar.mysql.database.azure.com -u me@foobar -p

From 18.04 and Windows 11, connection is successful. From 20.04, connection seems to hang, or never complete. I enter the password and get a prompt in 18.04, but not in 20.04.

18.04 client is 5.7. 20.04 is 8.0. Windows is 8.0.

I've tried several VMs in various locations and have been unable to get mysql client on 20.04 to connect. I've tried:

  • the 3 ports available - 3306, 3308, 3309, in various combinations with other options
  • allowing all traffic on the the Azure MySQL Firewall
  • disabling require SSL on Azure MySQL and using the --ssl-mode=DISABLED option
  • setting Azure MySQL to TLS 1.1 or 2.1 and using the --tls-version=TLSv1.1 or TLSv1.2 option. 1.1 fails with message SSL connection error: error:141E70BF:SSL routines:tls_construct_client_hello:no protocols available

None of these things have worked.

Score:1
cn flag

We had the same problem after unattended-upgrades updated the mysql packages to the latest version. Downgrading to the previous version (8.0.26-0ubuntu0.20.04.2) fixed the problem.

uz flag
`apt-get install mysql-client-8.0=8.0.19-0ubuntu5 mysql-common=5.8+1.0.5ubuntu2 mysql-client-core-8.0=8.0.19-0ubuntu5` worked a charm, thank you.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.