3
votes

I have a Web App running on Azure. I can connect to the DB with Visual Studio and sending/retrieving data on my app works fine.

However, I can not connect to the MySQL db using MySQL Workbench. The error that I have is

Lost connection to MySQL server at 'reading initial communication packet', system error: 54

I have whitelisted my IP on the azure portal and opened the port 1433 on my computer. I don't understand why can't I connect using MySQL Workbench while having no problem with Visual Studio.

EDIT:

Here is how i have setup MySQL Workbench:

MySQL Workbench

And Here is my Azure portal:

Azure Portal

I'm using port 1433 because that is the port given on the Azure Portal, but also in this tutorial: Connect to Azure DB using MySQL Workbench

1
Have you mixed up MySQL with SQL Server? 1433 is the port on which SQL Server listens. MySQL uses a different port. And there is no "Azure MySQL" product. Azure SQL is a SQL Server database. In any case, It doesn't matter which port you open on your machine, it's the server's port you want to connect to. For Azure SQL there are tutorials that show you how to connect securely. - Panagiotis Kanavos
Microsoft has kind of embraced open source and apparently offers MySQL databases in Azure. Of course, MySQL default port is 3306 and I can't tell whether they allow remote access. - Álvaro González
Please edit your question to show how you configured your connection in MySQL Workbench (of course, please don't include your real server name, username, or password). Note: All needed information for connecting is provided within the Settings->Properties blade for ClearDB-based MySQL databases (where you'll need hostname, port, username, and password). - David Makogon
@DavidMakogon Done, I have added my settings. - Dliix
@Dliix - that's because your database isn't MySQL - it's SQL Database. See my answer. - David Makogon

1 Answers

7
votes

Ok - now that you included screenshots: You're trying to use MySQL Workbench to connect to a SQL Database (which is SQL Server as a service, not MySQL).

Edit: 8/15/2017 Azure now offers Azure Database for MySQL which is currently in public preview.

In your specific case, you created a SQL Database, which cannot be manipulated with MySQL Workbench.