2

I am trying to kill a process but every time I do it keeps coming back. The process looks like this:

I have looked at the process list on Mysql and there is nothing.

/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/server.weloveyou.err --pid-file=/var/lib/mysql/server.weloveyou.com.pid

I have looked into the logs and this keeps happening:

130726 13:32:03 [Note] /usr/sbin/mysqld: Normal shutdown

130726 13:32:03 [Note] Event Scheduler: Purging the queue. 0 events
130726 13:32:03  InnoDB: Starting shutdown...
130726 13:32:05  InnoDB: Shutdown completed; log sequence number 0 2115443139
130726 13:32:05 [Note] /usr/sbin/mysqld: Shutdown complete

130726 13:32:05 mysqld_safe mysqld from pid file /var/lib/mysql/server.weloveyou.pid ended
130726 13:32:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130726 13:32:05 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
130726 13:32:05 [Note] Plugin 'FEDERATED' is disabled.
130726 13:32:05  InnoDB: Initializing buffer pool, size = 8.0M
130726 13:32:05  InnoDB: Completed initialization of buffer pool
130726 13:32:06  InnoDB: Started; log sequence number 0 2115443139
130726 13:32:06 [Note] Event Scheduler: Loaded 0 events
130726 13:32:06 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.70-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
130726 13:32:15 mysqld_safe Number of processes running now: 0
130726 13:32:15 mysqld_safe mysqld restarted
130726 13:32:15 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
130726 13:32:15 [Note] Plugin 'FEDERATED' is disabled.
130726 13:32:15  InnoDB: Initializing buffer pool, size = 8.0M
130726 13:32:15  InnoDB: Completed initialization of buffer pool
130726 13:32:15  InnoDB: Started; log sequence number 0 2115443139
130726 13:32:15 [Note] Event Scheduler: Loaded 0 events
130726 13:32:15 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.70-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) 

Has any one got any ideas?

Cheers

John

1
  • What OS/Distro are you using? How do you stopped mysql?
    – ALex_hha
    Jul 26, 2013 at 14:36

1 Answer 1

2

The mysql server runs with 2 processes, mysqld and mysqld_safe. If you kill mysqld with the SIGKILL signal (9), mysqld_safe will respawn mysqld. If you stop mysqld in the standard way, or kill it with the sigint(15) signal, mysqld_safe notices it and ends. If there is an emergency, remember always to kill -9 mysqld_safe first.

In this case, it seems that mysqld_safe is restarting just after shutdown. How are you exactly killing mysql?

6
  • I am not doing anything to kill mysql. All I can see is there is a process Mysql constantly running on our server: /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/server.weloveyou.err --pid-file=/var/lib/mysql/server.weloveyou.com.pid
    – user20996
    Jul 26, 2013 at 14:31
  • If you want to stop now the mysql server process, the standard way is /etc/init.d/mysql stop, whith root privileges. If you want to stop it running on startup, you just have to disable it on rc (exact procedure depends on distribution).
    – jynus
    Jul 26, 2013 at 14:37
  • I kill the above process and it comes back instantly
    – user20996
    Jul 26, 2013 at 14:40
  • Please, provide exact command you use and which user executes it.
    – jynus
    Jul 26, 2013 at 14:42
  • Its a server process PID: 4324 Owner: Mysql I have tried kill 4324 but it just comes back as another process.
    – user20996
    Jul 26, 2013 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .