Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

I had connected to the MYSQL database using WCF services with connection string:
C#
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.
Posted
Updated 22-Apr-11 5:50am
v2

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[^]
 
Share this answer
 
v3
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
 
Share this answer
 
Refer below it will help you,

Link1[^]

Link2[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900