MySQL Forums :: Connector/ODBC :: Cannot Connect to MySQL Using ODBC


Advanced Search

Cannot Connect to MySQL Using ODBC
Posted by: Kris van der Starren ()
Date: May 28, 2010 10:16AM

Hi There,

I'm using Connector/ODBC 3.51.27 on Windows 7 x64 but I can't seem to get it to connect to a MySQL server that I have running in a Ubuntu 9.1 virtual machine on my local workstation. I tried the following troubleshooting steps but still cannot seem to get it going. Can anyone suggest what I should try next? Thanks!

1. Tested access to database within the virtual machine by launching MySQL Administrator and logging in as the user in question.

2. Confirmed that the mysqld daemon was running by issuing "ps xa | grep mysqld"
root@ubuntu:/var/log/mysql# ps xa | grep mysqld
6203 ? S 0:00 /bin/sh /usr/bin/mysqld_safe
6336 ? Sl 0:05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
7203 pts/1 R+ 0:00 grep --color=auto mysqld

3. Confirmed that IPTables doesn't have any rules defined to block ports / connections.
root@ubuntu:/var/log/mysql# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

4. Disabled windows firewall

5. On Windows 7, the "Test" function with the Connector/ODBC interface returns the following error: Request returned SQL_ERROR. [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '192.168.41.132' (10061)

6. On Windows 7, pinged IP address of virtual machine to confirm that it was reachable.
Pinging 192.168.41.132 with 32 bytes of data:
Reply from 192.168.41.132: bytes=32 time<1ms TTL=64
Reply from 192.168.41.132: bytes=32 time=1ms TTL=64
Reply from 192.168.41.132: bytes=32 time<1ms TTL=64
Reply from 192.168.41.132: bytes=32 time<1ms TTL=64

7. On Windows 7, attempted to telnet to port 3306 on target machine. Telnet could not connect.
telnet 192.168.41.132 3306
Connecting To 192.168.41.132...Could not open connection to the host, on port 3306: Connect failed

Options: ReplyQuote


Subject Written By Posted
Cannot Connect to MySQL Using ODBC Kris van der Starren 05/28/2010 10:16AM
Re: Cannot Connect to MySQL Using ODBC Kris van der Starren 05/28/2010 11:40AM
Re: Cannot Connect to MySQL Using ODBC Kris van der Starren 05/28/2010 02:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.