Stopping MySQL database server: mysqld failed

first you can check the mysql running process by

ps -ef | grep mysql

then get the pid file path for the mysql and delete the .pid file

sudo rm path/to/.pidfile

and then run the command

sudo /etc/init.d/mysql stop

this worked for me.


Kill it softly first sudo kill 30882, if it does not help, kill it with fire sudo kill -9 30882, where 30882 is pid of mysql process.


I had the same issue. I first did

sudo /etc/init.d/mysql restart

and then

sudo /etc/init.d/mysql stop

worked.