Click here to Skip to main content
13,146,315 members (44,916 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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};;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 '' (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 22-Apr-11 5:24am
Updated 22-Apr-11 5:50am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:
3. install MySQL ODBC Driver-MyODBC 3.51. You can download it here:
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Refer below it will help you,



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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100