简体   繁体   English

使用MySQL Workbench连接到Azure MySQL数据库

[英]Connect to Azure MySQL Database using MySQL Workbench

I have a Web App running on Azure. 我有一个在Azure上运行的Web应用程序。 I can connect to the DB with Visual Studio and sending/retrieving data on my app works fine. 我可以使用Visual Studio连接到数据库,并且可以在我的应用程序上发送/检索数据。

However, I can not connect to the MySQL db using MySQL Workbench. 但是,我无法使用MySQL Workbench连接到MySQL数据库。 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. 我已在Azure门户上将我的IP列入白名单,并在计算机上打开了端口1433。 I don't understand why can't I connect using MySQL Workbench while having no problem with Visual Studio. 我不明白为什么在使用Visual Studio没问题的情况下无法使用MySQL Workbench连接。

EDIT: 编辑:

Here is how i have setup MySQL Workbench: 这是我如何设置MySQL Workbench:

MySQL工作台

And Here is my Azure portal: 这是我的Azure门户:

Azure门户

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 我正在使用端口1433,因为这是Azure门户上给出的端口,但也在本教程中: 使用MySQL Workbench连接到Azure DB

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). 好的-现在您包括了屏幕截图:您正在尝试使用MySQL Workbench连接到SQL数据库(这是SQL Server即服务,而不是MySQL)。

Edit: 8/15/2017 Azure now offers Azure Database for MySQL which is currently in public preview. 编辑:2017年8月15日Azure现在提供了MySQL的Azure数据库,数据库当前处于公共预览状态。

In your specific case, you created a SQL Database, which cannot be manipulated with MySQL Workbench. 在您的特定情况下,您创建了一个SQL数据库,该数据库无法使用MySQL Workbench进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM