Linux – Stopping MySql server on Linux (to try and reset root password)

linuxMySQL

I was trying to stop mysql on Ubuntu to follow the steps explained here on how to reset the password:
http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html
the problem is whenever I kill mysqld process, it gets spawned again.

Any idea how to force stopping it or figuring out what's starting it?

Best Answer

Do such command for older ubuntu, as said in http://www.codeunit.co.za/2010/07/07/how-to-start-or-stop-mysql-server-on-ubuntu-via-the-command-line/

sudo /etc/init.d/mysql stop

And for newest ubuntu, the upstart program manages mysqld running all time... use command as said here

sudo initctl stop mysql

or

sudo stop mysql