简体   繁体   English

无法连接到 Azure Database for MySQL

[英]Cannot connect to Azure Database for MySQL

I created an Azure Database for MySQL.我为 MySQL 创建了一个 Azure 数据库。 When I try connect to it from MySQL Workbench, it cannot connect.当我尝试从 MySQL Workbench 连接到它时,它无法连接。 However if I test the connection, the test passes.但是,如果我测试连接,则测试通过。

When I test the connection, the test is successful:当我测试连接时,测试成功:

在此处输入图片说明

When I try to connect however, it can't:但是,当我尝试连接时,它不能:

在此处输入图片说明

On the Azure Portal, I've allowed all IP addresses on the firewall and disabled "Enfore SSL connection":在 Azure 门户上,我已允许防火墙上的所有 IP 地址并禁用“Enfore SSL 连接”:

在此处输入图片说明

Any ideas?有任何想法吗? The connection fails in less than 5 seconds, so I don't think it's a timeout issue.连接在不到 5 秒内失败,所以我认为这不是超时问题。 Here is a list of all the timeouts on MySQL Server (on Azure):以下是 MySQL 服务器(在 Azure 上)上所有超时的列表:

在此处输入图片说明

I resolved the issue by changing the bind_address=0.0.0.0 (mariadb.cnf or mysql.cnf).我通过更改 bind_address=0.0.0.0(mariadb.cnf 或 mysql.cnf)解决了这个问题。

Now I can connect to it using telnet (to check the setting).现在我可以使用 telnet 连接到它(检查设置)。

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

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