Ubuntu – How to stop thesqld process


result of ps -e | grep mysqld

enter image description here

running htop and clicking on memory usage..

enter image description here

It is taking 33% of 4gb memory.

I just want to end the mysqld process.. running sudo pkill mysqld ends the process but again the process starts.. I want to completely end it and get the memory back.

Best Answer

The mysql Upstart configuration has the respawn option:

$ grep respawn /etc/init/mysql.conf
respawn limit 2 5
        elif echo $statusnow | grep -q 'respawn/' ; then

The respawn option tells Upstart to restart the process if it exits or is killed. The limit is 2, so you can try killing of the processes twice, which will tell Upstart not to start them again, or use:

sudo service mysql stop