Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

my apologies for having already posted on this issue, but it has moved on so far I feel a new question is the only way to go.

First a little history - I have a MySQL server which runs a few small databases, as well as a Magento e-commerce store. This server crashed towards the end of last year. Setting innodb_force_recovery to 3 resurrected the server, and I thought nothing more of it.

However, as of this week, the server refuses to stay running for more than a few minutes at a time. As soon as I request anything of it, it falls over.

Following the crash at the end of last year, I attempted to drop some old databases from the server. During one of these drops, I received a 'The connection to the server was lost during the query' error, and the database remained. A little investigation showed that I had a corrupt ibdata1 file.

Now, the crashes are so frequent that I am unable to keep the server running. I want tro restore my Magento database from a brand new SQL file taken yesterday. The steps I am performing are as follows:

  1. Shut down MySQL
  2. Rename ibdata1, ib_logfile0 and ib_logfile1 so that they are not found by the server.
  3. Restart the server.

At this point, the ib* files above are re-created as expected. However, I am unable to connect to the server - I get a 'cannot connect to local MySQL server through socket' error.

My syslog files sometimes show an 'mysql post-start process (xxx) terminated with status 1' error.

I have also tried to the following process:

  1. Start MySQL
  2. Drop ALL user databases (i.e. not MySQL and system databases)
  3. Shut down MySQL
  4. Rename ibdata1, ib_logfile0 and ib_logfile1 so that they are not found by the server.
  5. Restart the server.

However, the server crashes at the point at which I try to drop the troublesome schemas.

In short, I am unable to keep the server running for long enough to implement the fix required.

This is a server run on a Ubuntu-based VPS

Any suggestions or hints are very, very welcome.


share|improve this question
Can you post the output of the MySQL error log, during one attempt to drop the tables? Usually there are [Error] entries which clearly identify why the server is shutting down. This will usually be called [hostname].log in your MySQL data directory, though it might be overridden if you have log-error defined in your MySQL configuration files. –  Nathan Jolly Mar 4 '14 at 12:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.