Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu can't stop mysqld

Tags:

mysql

ubuntu

I try running service mysql stop, killall -s SIGKILL mysqld, /etc/init.d/mysql stop, and stop mysql, but still I see this output from ps aux | grep mysql:

root     32302  0.0  0.3  59040  2120 pts/8    S    06:03   0:00 sudo mysqld_safe
root     32305  0.0  0.1   4440   772 pts/8    S    06:03   0:00 /bin/sh /usr/bin/mysqld_safe
mysql    32651  0.1  6.8 426740 41388 pts/8    Sl   06:03   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
like image 524
Rose Perrone Avatar asked Sep 11 '13 06:09

Rose Perrone


People also ask

How do I terminate MySQL?

Invoke mysql from your command prompt to start it, specifying any connection parameters that may be necessary. To leave mysql, use a QUIT statement.

What is mysqld Ubuntu?

mysqld, also known as MySQL Server, is the main program that does most of the work in a MySQL installation. MySQL Server manages access to the MySQL data directory that contains databases and tables. The data directory is also the default location for other information such as log files and status files.


2 Answers

The only thing that worked for me is partially explained here.

If everything else fails, try this:

root@myhost:/usr/bin# initctl --system stop mysql

After that you can start controlling mysql normally using

root@myhost:/usr/bin# /etc/init.d/mysql start

Or

root@myhost:/usr/bin# initctl --system start mysql
like image 183
Tom Silverman Avatar answered Oct 11 '22 19:10

Tom Silverman


You can use pkill mysqld

Linux man page: pkill

like image 38
Adem Öztaş Avatar answered Oct 11 '22 20:10

Adem Öztaş