Link to home
Start Free TrialLog in
Avatar of progowski
progowski

asked on

Trouble connecting to MySQL server through ODBC

Hello,  I want to connect a MS Access front-end to a MySQL back-end database running on a remote Linux server over VPN and through MySQL/ ODBC connector.

I've been given VPN and MySQL server access and IP address. I can connect over VPN to the MySQL server and run an php application on the Linux server through a web browser.

The problem arises when I try to setup a user or system DSN and connect to the remote server through ODBC (the port open for me on the server is 22). Same happens when I try opening up a connection straight from VBA.
The connection fails with the following error:

Lost connection to MySQL server at 'reading initial communication packet', system error: 2

I've tried using MySQL/ ODBC connectors 5.1 and 5.2 on Win7 64bit and on Vista 32bit.
I've also tried accessing the MySQL server through ODBC over LAN without success.
I've tried increasing CONNECT_TIMEOUT on the MySQL server and changing the bind address in /etc/mysql/my.cnf on the server to the server's IP address....and have run out of ideas.

I'd really like to avoid exchanging data through text files so I'd be very glad to hear a solution.
Error-2.png
error-1.png
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

The standard port is 3306, not 3036.  Try 3306 and see if it connects.
Avatar of progowski
progowski

ASKER

I wish it would be so easy :)
I was posting late and have made a typing error before taking the screenshot.
The port open to me on the server is 22.
Trying to connect to any other port results in the 'can't connect to MySQL server on ....' error.
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial