Hi,
I am trying to connect MySQL Server in c# by using Odbc 3.51 driver. I have created DSN and tested, it display message as "Success, connection was made". But when i try to connect in c#, it gives me error as "ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10022)".
Thanks in advance.
Loading
VikramPosted Dec 3, 2009, 5:05 AM
I installed MySQLConnector/NET connector, still i am getting same error "Unable to connect to any of the specified MySQL hosts". I installed same database and connector on another pc it working fine.
Thanks
Kirtan PatelPosted Nov 13, 2009, 8:47 AM
Now i m sure that there is problem with your MySQl Installation
Step 1
remove my sql Service
------------------------
to remove the service, goto cmd and type 'mysqladmin -uroot -p shutdown' , type your master password if it asks for it.
Type in 'mysqld --remove' and this will uninstall and remove the service.
and
Step 2
Uninstall MYSQL
Step 3
reinstall My SQL it will solve your problem
-
and check "Do you like this answer check box" if it helps you :)
VikramPosted Nov 13, 2009, 8:35 AM
I have already tried that option using Connector, I am getting error as "Unable to connect to any of the specified MySQL hosts."
Thanks
Kirtan PatelPosted Nov 13, 2009, 8:31 AM
if you are using My SQL Then Why dont you using MySQL Connector ?
Which will better handle MySQL then Odbc Connection ..
After installing my SQL Connector You will have New Name space
System.Data.MySql
then you can use all the Facilities better and you will easily handle this type of operation :)
Download My SQL Connector from Here
http://dev.mysql.com/downloads/connector/net/6.2.html
if my answer helped you then check "Do you like this answer checkbox " :)