Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WCF MySQL ODBC
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.
Posted 22-Apr-11 6:24am
Edited 22-Apr-11 6:50am
v2
Rate this: bad
good
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[^]
  Permalink  
v3
Rate this: bad
good
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: 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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Refer below it will help you,
 
Link1[^]
 
Link2[^]
  Permalink  
v2

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



Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2014
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