August 10th, 2009
If you’re a web developer, you might have encountered this error when trying to connect to a MySQL server through an ODBC connection. In fact it did happen to me just a few hours ago. I was trying to run a SQL query with Microsoft Access and the MySQL server kept disconnecting with the following error message:

Turns out the solution is quite easy if you have administrative privileges to your web server. If not then you might to contact your web hosting company’s support.
All you have to do is to connect to your server through SSH and edit the MySQL server configuration file. Usually this file is named my.cnf and is located in /etc on Linux servers.
Simply increasing the value of wait_timeout should do the trick. For my part I’ve set it to 300 seconds.
wait_timeout = 300
Save and close my.cnf and restart the MySQL service:
# service mysql restart
Try reconnecting through your ODBC link and see if the problem persists.
Posted in Articles | No Comments
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment