简体   繁体   English

无法远程连接到azure mysql数据库

[英]Cant connect to azure mysql database remotely

I've created an azure mysql database, added my client IP to the firewall to allow it. 我创建了一个azure mysql数据库,将我的客户端IP添加到防火墙以允许它。 I've added the ports 1433 and 3306 to both inbound and outbound exceptions to my windows firewall. 我已将端口1433和3306添加到我的Windows防火墙的入站和出站异常中。 I've opened both ports on my router. 我在路由器上打开了两个端口。 I am still unable to connect to my database using programs, such as workbench or toad. 我仍然无法使用诸如workbench或toad之类的程序连接到我的数据库。 It gives me errors such as "An existing connection was forcibly closed by the remote host." 它给了我一些错误,例如“现有连接被远程主机强行关闭”。 Workbench gives the error "Lost connection to mysql server at 'reading initial communication packet', system error: 0. I know my information is all correct, because i know it is connecting. But something is denying my access. I've exhausted all google searches and nothing is solving the problem. If my connection info is correct and all IP's and ports are accounted for, what else could be the problem? Workbench给出错误“在读取初始通信数据包时丢失了与mysql服务器的连接”,系统错误:0。我知道我的信息都是正确的,因为我知道它正在连接。但是有些东西在拒绝我的访问。我已经筋疲力尽了谷歌搜索并没有解决问题。如果我的连接信息是正确的,所有的IP和端口都被考虑在内,还有什么可能是问题?

The strange thing is i can connect through visual studio. 奇怪的是我可以通过visual studio连接。 It's the only thing that will let me connect, however the interface to edit the mysql databse in visual studio is horrific. 这是唯一可以让我连接的东西,但是在visual studio中编辑mysql数据库的界面是可怕的。 I cant even get it to work properly. 我甚至无法让它正常工作。 Any ideas would be appreciated so that i can get connected from a decent mysql editor. 任何想法将不胜感激,以便我可以从一个体面的mysql编辑器连接。

Take a look at this ANSWER and make sure your MySQL config is correct and your users are configured properly. 看一下这个答案 ,确保你的MySQL配置正确并且你的用户配置正确。

Hope that helps. 希望有所帮助。

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

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