Dengar's Blog Logo

Dengar's blog...
We will see what I post, probably will be some random tutorials

Thursday, 22 July 2010

MySQL problems: Starting MySQL. ERROR! Manager of pid-file quit without updating file.

I stumbled across this error when I tried to import an InnoDB backup into my existing MySQL server.
I have one application that collects data that I need to tie to another set of data that is recorded on a different server through a different application.
It's been rather challenging, cause I had to work of an InnoDB backup and they aren't easily imported to another MySQL server, especially if you want to keep the data on that other server.

Okay, so what I tried, and ultimately prevented me from restarting MySQL was:

  1. changing all tables on the MySQL server to MyISAM
  2. killing MySQL (yes, I couldn't stop it)
  3. copying the files in the MySQL DataDir to a backup location
  4. Copying the InnoDB backup files that I want to import into my DataDir
  5. trying to restart MySQL
But this is were the trouble started. The files couldn't be imported and I had to roll back and use my backup files. But:
# sudo /etc/init.d/mysql start
Starting MySQL. ERROR! Manager of pid-file quit without updating file.
So I deleted the pointer file in /var/lock/subsys/
# sudo rm -f /var/lock/subsys/mysql
# sudo /etc/init.d/mysql start
Starting MySQL. ERROR! Manager of pid-file quit without updating file.

This didn't work...
After long fiddling, I found out that the files in my DataDir have changed it's owner, since I copied them as root to the backup location and back. They were now owned by root. So after:

# sudo chown mysql:mysql *
# sudo chgrp mysql *
I could do:
# sudo /etc/init.d/mysql start
 Starting MySQL. SUCCESS!
Hope this helps you too!