odbc mysql server_无法使用ODBC连接连接到MYSQL服务器

bd96500e110b49cbb3cd949968f18be7.png

Hi All,

I had connected to the MYSQL database using WCF services with connection string:OdbcConnection sqlcon = new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};SERVER=xxx.xxx.xxx.xx;database=xxxxxx;UID=xxxxxx;Pwd=xxxxx;Connect Timeout=500; pooling=true; Max Pool Size=200");

I had used those services from 4 months. But suddenly it''s giving the error as:

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Cant connect to MySQL server on ''xxx.xxx.xxx.xx'' (10060).

I had tried with the server name also. Still I''m getting the same error.

Any suggestions would be greatly appreciated. Thank you!

Varshini M.

解决方案Perhaps a firewall is in place and block connection to MySQL tcp port 3306 ?

Is the MySQL and your program running on the same computer?

Can''t connect to [local] MySQL server[^]

Another thing, take a look at the managed MySQL database connector and skip ODBC.

Download Connector/Net[^]

1. Make sure you have installed the .Net Framework on your server

2. Download the ODBC .Net data provider and install it on your development machine or your server. You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccd8427-1017-4f33-a062-d165078e32b1&DisplayLang=en

3. install MySQL ODBC Driver-MyODBC 3.51. You can download it here: http://dev.mysql.com/downloads/connector/odbc/3.51.html

Refer below it will help you,

Link1[^]

Link2[^]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值