Unable to connect to any of the specified MySQL hosts when checking connection

前端 未结 4 1587
无人共我
无人共我 2020-12-20 07:53

I am trying to connect to Mysql database through vb.net However I run into the error:

Unable to connect to any of the specified MySQL hosts

相关标签:
4条回答
  • 2020-12-20 08:23

    Try with this ConnectionString:

     MysqlConn.ConnectionString = "Server=localhost;Database=My_Mysql_Database;Uid=root;Pwd=root;"
    
    0 讨论(0)
  • 2020-12-20 08:27

    The "Can't connect to MySQL server" error usually is the result of not being able to reach the server, e.g. if it is not running or it is on a remote machine but firewalls block access. See also the video I added to the MySQL channel for how to set up connections.

    0 讨论(0)
  • 2020-12-20 08:29

    Please check that MySql Service is running by typing "services.msc" in the "run". I hope it will help you!

    0 讨论(0)
  • 2020-12-20 08:47

    I have the same problem. But I was a server, in a domain, and now the server is outside the domain.

    I try to change the rulesin firewall of the server (where there is MySql server). So go to inbound rules, and search the 2 Mysql rules.

    Open them and search th Advanced item. Then check Domain, or/and Private, or/and Public

    (for me, Domain was the only cheked option, not good for me because I 'm now outside the domain).

    Hope it helps ! Cheers :)

    0 讨论(0)
提交回复
热议问题