ODBC Call Failed. MySQL Server Has Gone Away.

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:

mysql-odbc-call-failed

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.

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment




Webmaster Resources: Web Hosting Blog
© Copyright 2012 - TheWebHostingHero.com
Follow us on TwitterFacebookSubscribe to our RSS Feed