简体   繁体   English

无法使用 MySQL Workbench 连接到 Azure MySQL 服务

[英]Cannot connect to Azure MySQL service with MySQL Workbench

I'm using MySQL Workbench on a 64bit/Win 8.1 machine to trying to connect to an Azure MySQL service, but everytime I get the following error:我在 64 位/Win 8.1 机器上使用 MySQL Workbench 尝试连接到 Azure MySQL 服务,但每次我收到以下错误:

Lost connection to MySQL server at 'reading authorization packet', system error:0在“读取授权包”时失去与 MySQL 服务器的连接,系统错误:0

I followed many tutorial found ever the internet, and I also tried to disable temporarely the firewall: most of them says that the only needed parameters are:我遵循了互联网上发现的许多教程,并且我还尝试暂时禁用防火墙:他们中的大多数人说唯一需要的参数是:

  • hostname (the one given in Azure portal/MyDB/Properties)主机名(Azure 门户/MyDB/Properties 中给出的名称)
  • username (the one given in Azure portal/MyDB/Properties)用户名(Azure 门户/MyDB/Properties 中给出的用户名)
  • (optional) password (to store in vault) (可选)密码(存储在保险库中)

I tried also using different connection methods (Standard TCP/IP and Local socket/pipe, as suggested here ) but nothing.我也试过用不同的连接方法(标准TCP / IP和本地插座/管,作为建议在这里),但什么都没有。

Can help?可以帮助?

I was not able to recreate your issue.我无法重现您的问题。 Here are the steps that I tried with a MySQL database created thru the Azure portal.以下是我尝试使用通过 Azure 门户创建的 MySQL 数据库的步骤。

  1. Open MySql Workbench.打开 MySql 工作台。
  2. Setup new connection with the following settings.使用以下设置建立新连接。
  3. Hostname: HOSTNAME主机名:HOSTNAME
  4. Port: PORT港口:港口
  5. Username: USERNAME用户名:USERNAME
  6. Pasword: PASSWORD密码:密码
  7. Database: DATABASE NAME数据库:数据库名称
  8. Test Connection > Succeeded.测试连接 > 成功。

The settings above came from portal.azure.com > MyDatabase > All settings.上面的设置来自 portal.azure.com > MyDatabase > All settings。

One suggestion is to contact ClearDB support.一种建议是联系 ClearDB 支持。 You can login to ClearDB from your database's Azure dashboard by clicking on Manage Database.您可以通过单击管理数据库从数据库的 Azure 仪表板登录到 ClearDB。 From there you can go to Support and log a support incident.从那里您可以转到支持并记录支持事件。

I was also struggling with a similar issue, as I was not able to connect my MySQL workbench with Azure VM that's running MySQL.我也遇到了类似的问题,因为我无法将 MySQL 工作台与运行 MySQL 的 Azure VM 连接起来。

I've contacted the Azure support to help me out after trying it for 3-4 hrs.在尝试了 3-4 小时后,我联系了 Azure 支持以帮助我解决问题。

They suggested me to go into network security group of that VM, and add 3306 or whatever port that your MySQL is running on our Azure to the inbound and outbound list and add the exception as All.他们建议我进入该 VM 的网络安全组,并将 3306 或您的 MySQL 在我们的 Azure 上运行的任何端口添加到入站和出站列表,并将例外添加为全部。

It helped me to connect MySQL workbench with Azure VM with MySQL on it.它帮助我将 MySQL 工作台与带有 MySQL 的 Azure VM 连接起来。

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

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