MySQL-Linux error when attempting to stop its service

Go To StackoverFlow.com

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.

2012-04-05 20:26
by fanchyna
+1 for awesome explanation. Try repairing all the tables - hjpotter92 2012-04-05 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 2012-04-10 15:40
If that is your answer, please add it as an answer and mark it as answered - DRaehal 2012-11-05 19:07
"If that is your answer, please add it as an answer and mark it as answered." Seconded - Danack 2013-01-10 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 2013-01-14 13:38


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.

2013-01-15 17:09
by Martin
Ads