![](/img/trans.png)
[英]Unable to connect to any of the specified MySQL hosts in c# windows form
[英]unable to connect any of the specified MySQL host c# application from windows pc trying to connect mysql server on Ubuntu 16.04 server
我已经在所有装有Windows 10 OS的LAN PC上安装了C#应用程序,并且在中央服务器上安装了Ubuntu 16.04,并在其中安装了mysql服务器,并且我的C#应用程序与中央服务器通信,它可以工作一段时间,但是一段时间后,它会显示“无法连接任何指定的MySQL主机。
我已将mysql配置文件更改为:将bind-address更改为“我的服务器IP地址”,并通过“ 0.0.0.0”进行检查,进行#skip-networking注释,打开3306端口,在防火墙中允许3306端口,增加max_connections,授予用户从%地址访问,
在我的C#应用程序中,我使用了标准的连接字符串方式
在我的服务器在Windows上运行之前,它运行良好,运行正常,没有网站上的任何错误
检查连接字符串。 有时候,对于Mysql来说很重要(带空格!):
Server=server_host_name; Port=port_number; Database=myDataBase; Uid=user_name; Pwd=passwoed;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.