views:

90

answers:

1

Hi, When I am trying to connect to the localhost, there is no problem. But when I am connecting to my server, I am getting this error.

[08S01][MySQL][ODBC 5.1 Driver] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 2

Please tell me how to work around this. I have tried with MySQL ODBC Drivers, both 3.51 and 5.1 drivers.

A: 

An ODBC connection to MySQL cannot be made through HTTP (or PHPMyAdmin).

How are you trying to connect?

Edit: time-out may also be an issue. Change the connect_timeout global variable to 30 seconds (or some other 'long' time) and see whether that helps.

Tobiasopdenbrouw
I am trying to connect through Control Panel>Administarative Tools>Data Sources(ODBC)
Firewall or other access restrictions between your computer and your server? What if you try to create an odbc connection on the server itself, does that work?
Tobiasopdenbrouw
@Tobiasopdenbrouw, Can you please tell me how to do that??
The same route you're taking with your Control Panel on the non-server machine, but then on the server. If that works, you'll know that basically ODBC access like you require is supported, but you're having request (access/security) difficulties. If the ODBC fails on the server itself, you'll know the problem is more basic.
Tobiasopdenbrouw
Thanks...Tobiasopdenbrouw There was a firewall installed on the server
Glad to hear your solved it. Could you mark the answer as complete if it is?
Tobiasopdenbrouw