无法使用ODBC连接连接到MYSQL服务器 [英] Cannot connect to MYSQL server using ODBC Connection

查看:606
本文介绍了无法使用ODBC连接连接到MYSQL服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已使用带有连接字符串的WCF服务连接到MYSQL数据库:

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");



我从4个月开始使用这些服务.但是突然它给出了如下错误:
错误[HY000] [MySQL] [ODBC 3.51驱动程序]无法连接到"xxx.xxx.xxx.xx"(10060)上的MySQL服务器.

我也尝试过使用服务器名称.我仍然遇到相同的错误.

任何建议将不胜感激.谢谢!
Varshini M.



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.

推荐答案

也许已安装防火墙并阻止了与MySQL tcp端口3306的连接? MySQL和您的程序是否在同一台计算机上运行?

无法连接到[本地] MySQL服务器 [ ^ ]


另一件事,看看托管的MySQL数据库连接器并跳过ODBC.
下载Connector/Net [
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.确保已在服务器上安装了.Net Framework.
2.下载ODBC .Net数据提供程序并将其安装在开发计算机或服务器上.您可以在这里下载它:http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccd8427-1017-4f33-a062-d165078e32b1&DisplayLang=en
3.安装MySQL ODBC Driver-MyODBC 3.51.您可以在这里下载它:http://dev.mysql.com/downloads/connector/odbc/3.51.html
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


下面的引用将为您提供帮助,

Link1 [
^ ]

Link2 [ ^ ]
Refer below it will help you,

Link1[^]

Link2[^]


这篇关于无法使用ODBC连接连接到MYSQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆