11

This is the message I got when I was trying to stop a MySQL server on my machine:

MySQL manager or server PID file could not be found

The command I executed:

service mysql stop

or

/etc/init.d/mysqld stop

I also attempted to start the MySQL server, but I got the following error

Starting MySQL.Manager of pid-file quit without updating file

I cannot access MySQL database.

A few points to address:

  1. I have the my.cnf file under /etc/my.cnf
  2. ps -ef |grep mysql does not display any processes
  3. /var/run/mysqld/ is empty (no mysql.pid file)
  4. /tmp/mysql.sock does not exist

I read the file /var/log/mysqld.log and it seemed that mysql was trying to do some crash recovery. There could be a shutdown yesterday but it was out of my control. I just want to get the database back. Can any expert help me? I have the sudo account of this machine but I would not reboot this machine unless it is the last option because it is a server used by other people.

Augusto
  • 779
  • 5
  • 18
fanchyna
  • 2,623
  • 7
  • 36
  • 38
  • +1 for awesome explanation. Try repairing all the tables? – hjpotter92 Apr 05 '12 at 20:30
  • We finally choose to reboot the system. The problem was caused by somebody who made a large query which could run forever. He did not want to wait so he pressed the "Ctrl+c", but he did not realized that the disk was already full. We lost some data, indeed. – fanchyna Apr 10 '12 at 15:40
  • If that is your answer, please add it as an answer and mark it as answered. – DRaehal Nov 05 '12 at 19:07
  • "If that is your answer, please add it as an answer and mark it as answered." Seconded. – Danack Jan 10 '13 at 04:01
  • **service mysql stop** won't work, you need to run **service mysqld start/stop** or whatever in order to interact we the mysql service. – Augusto Jan 14 '13 at 13:38

1 Answers1

0

I was getting the same error and after searching the first 4 pages of google and trying everything suggested (repairing tables, moving my.cnf, clearing locks, rebooting etc) nothing worked. It turned out that it was because I had manually cleared some old binary logs (binary.00001, binary.00002 etc) but i hadn't updated the binary.index file to match. I deleted the appropriate lines from binary.index and it just worked.

Martin
  • 1
  • 1