简体   繁体   English

无法从Windows PC连接任何指定的MySQL主机c#应用程序,尝试在Ubuntu 16.04服务器上连接mysql服务器

[英]unable to connect any of the specified MySQL host c# application from windows pc trying to connect mysql server on Ubuntu 16.04 server

I have C# application installed all my LAN PC having windows 10 OS, and my central server has Ubuntu 16.04 installed on which mysql server is installed and my C# application communicate to the central server, it's working well some time, but some time it gives "unable to connect any of the specified MySQL host. 我已经在所有装有Windows 10 OS的LAN PC上安装了C#应用程序,并且在中央服务器上安装了Ubuntu 16.04,并在其中安装了mysql服务器,并且我的C#应用​​程序与中央服务器通信,它可以工作一段时间,但是一段时间后,它会显示“无法连接任何指定的MySQL主机。

I have changed mysql configuration file as: bind-address to "my server ip address" and also check it by "0.0.0.0", make #skip-networking comment, open 3306 port, allowed 3306 port in firewall, increase max_connections, grant user to access from % address, 我已将mysql配置文件更改为:将bind-address更改为“我的服务器IP地址”,并通过“ 0.0.0.0”进行检查,进行#skip-networking注释,打开3306端口,在防火墙中允许3306端口,增加max_connections,授予用户从%地址访问,

And in my c# application i used standard way of connection string 在我的C#应用​​程序中,我使用了标准的连接字符串方式

It was working very well before when my server was on windows, It is working very well without any error from my website 在我的服务器在Windows上运行之前,它运行良好,运行正常,没有网站上的任何错误

Check connection string. 检查连接字符串。 Some times it's matter for Mysql (with spaces!): 有时候,对于Mysql来说很重要(带空格!):

Server=server_host_name; Port=port_number; Database=myDataBase; Uid=user_name; Pwd=passwoed;

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

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