0

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.

user279244
  • 961
  • 5
  • 18
  • 32

1 Answers1

0

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
  • 13,811
  • 1
  • 22
  • 27
  • I am trying to connect through Control Panel>Administarative Tools>Data Sources(ODBC) – user279244 Jul 30 '10 at 06:12
  • 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 Jul 30 '10 at 11:22
  • @Tobiasopdenbrouw, Can you please tell me how to do that?? – user279244 Aug 02 '10 at 06:54
  • 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 Aug 02 '10 at 09:31
  • Thanks...Tobiasopdenbrouw There was a firewall installed on the server – user279244 Aug 04 '10 at 12:50
  • Glad to hear your solved it. Could you mark the answer as complete if it is? – Tobiasopdenbrouw Aug 04 '10 at 14:57