ERROR 2013 (HY000): Lost connection to MySQL server during query

Recently had a problem with a MySQL iDA backup on a Linux platform. I was seeing a failure where we would get the error below (and per subject) included in the CommVault backup error.

ERROR 2013 (HY000): Lost connection to MySQL server during query

Upon further investigation it was determined that the error was being triggered during a MySQL query as performed by the MySQL iDA during backup attempt. When we attempted to do the same query manually against a MySQL connection we’d also get the same error. It was determined from the MySQL iDA logs that the database causing us the problem was called “prod”.

See the example below;

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.1.32-community-log MySQL Community Server (GPL)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> use prod
Database changed
mysql> show table status;

ERROR 2013 (HY000): Lost connection to MySQL server during query

As you can see the error was reproducible. Further investigation determined that the database was corrupt in some way, as we could see a large number of errors in the MySQL logs. Fix the corruption on the database and/or exclude it from the backups until resolved by the MySQL DBA.

1 Comment

  • Mahesh December 14, 2014

    Hello Sir,

    This blog is very useful which is related to my searches. I have seen your info on My SQL. Especially you hava shown this with a best example . The info you provided is very useful for any interested on SQL. I am very much satisfied with your info.The information you gave is very handy to get an skillsets.

Comments are closed.