Way to Resolve “MySQL Server Has Gone Away” Error Message

February 3, 2010

consider a situation where your MySQL database is corrupted and you encounter the below error message when you attempt to access its records:

“ERROR 2006 (HY000): MySQL server has gone away.”

The above error message appears every time you run a query to access the database records. In addition, the above error message makes data stored in the database inaccessible.

Cause:

MySQL database corruption.

Resolution:

To resolve the above error message and accessing of data, you will need to run “OPTIMIZE TABLE tablename” command. You will further receive any of the below error messages:

“ERROR 1030 (HY000): Got error -1 from storage engine”
Or
“ERROR 1030 (HY000): Got error 28 from storage engine”
The first error message appears when database could not recover from previous database crash. The second error pops up when there is no space left on the device.

To repair your database, you will need to follow below steps:

1. Add the below line into mysqld section in my.cnf:
innodb_force_recovery=4
2. Stop mysqld and and restore data backup to mysqld data folder.
3. Re-start mysqld and perform a thorough check on your tables.
4. Run some queries.
5. Optimize all your tables.

The above resolution fails to perform when you have not created any database backup. In case no backup is available, you will need to use advanced MySQL database repair utility. These MySQL Repair tools use intensive scanning methods to orderly repair the corrupted database.

Stellar Phoenix Database Recovery For MySQL is an effective repair software that repair corrupted MySQL database installed on Linux or Windows platform. Supported by MySQL 5.x and 4.x, the mysql recovery software provides absolute recovery of almost all MySQL components, such as, tables, primary key(s), and relations.

Comments are closed.