How do I stop this stubborn Mysqld service under Debian?


The question is very simple.
I would like to upgrade my Mysql.
But the aptitude program failed to stop Mysqld saying:

Stopping MySQL database server: mysqld failed!
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 1
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!

What do I do in order to stop the Mysql database?

The following also fails:

# /etc/init.d/mysql stop
Stopping MySQL database server: mysqld failed!

Anyone? Any ideas? :)

Best regards,
Terrible Johnny
Who is Participating?
arrkerr1024Connect With a Mentor Commented:
pkill -9 mysqld
pkill kills processes by name, the -9 sends a SIGKILL signal which will force it to immediately quit.
potwornyAuthor Commented:
Why do I have a feeling that data may be lost when killing mysqld?
potwornyAuthor Commented:
I used the following solution:

killall -w mysqld

The database closed and therefore I was able to upgrade it. But I still have a feeling that it was unsafe...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.