Cannot connect with ODBC (1 Viewer)

colkas

Registered User
Joined
Apr 12, 2011
Messages
128
Hi

I have Mysql databse running on a windows 7 computer and this works fine. I now want to link to it form another computer using ODBC, I have loaded the ODBC connector for MySQl....

However when I try and connect I am getting and error message saying
"Connection Failed (HY000) ODBC 5 driver cannot connect to Mysql server on localhost 100061"

I have trawled the web for some answers, from one of thses I have added the port 3306 on the Mysql computer firewall. other than that I cannot find a solution. So 2 questions....

1. How do I PING the server form another computer, I can ping the computer name but notsure how to ping the actual DB connection.

2. Any ideas anyone jhow to connect with the ODBC, if I cant get this working then our databse is no good.

The settings are localhost, 3306, sa, password

Thanks
 

colkas

Registered User
Joined
Apr 12, 2011
Messages
128
Hi

I have been trying to solve this some more but I am still having problems. 1 person suggested I use an IP which I have done but it still gives same problem.

Hope somone can help, its quite urgent and if we cant network the database is no good to anyone...

Thanks
 

smallapplications

New member
Joined
May 23, 2011
Messages
3
First let me remind you that localhost is not the name of the computer having MySQL - it is how you access MySQL server from the SAME computer (sorry for pointing out the obvious)

Then, if this is not an issue here (using name localhost to access other computer), I would suggest few things:
1. from command prompt on the other computer (not the one having MySQL server) try following:
telnet nameofthecomputerhavingmysqlserver 3306
If something is not OK, you'll get the message:
Connecting To nameofthecomputerhavingmysqlserver ...Could not open connection to the host, on port 3306: Connect failed

Next, if this was OK (you could connect to the server using telnet) you can try reinstalling MySQL connector/ODBC (on the remote computer from which you are trying to connect to MySQL). You can download installation from:
MySQL Connector/ODBC 3.51 dev.mysql.com/downloads/connector/odbc/3.51.html#downloads
MySQL Connector/ODBC 5.1 dev.mysql.com/downloads/connector/odbc/
(add http part to the addresses above)
and if you still can not connect using ODBC you should try to connect using ADO connection (available both from ASP/ASP.NET and PHP) using following connection string:
Driver={MySQL ODBC 3.51 Driver};Server=nameofthecomputerhavingmysqlserver;Database=nameofyourdatabase;User=someuser;Password=somepasswd;Option=3;


Hope this helps!

If you need additional help contact me at admin [at] small-applications.com

All the best!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom