4

I tried to restart MySQL through WHM and now its taking way too long to restart, the progress bar is still showing.

What can I do?

I can still access the server via SSH but I cannot connect to MySQL. This is urgent as my online store is now down.

Will restarting the HTTP Server (Apache) help?

2
  • 1
    Quick Question: Is this Linux ??? What version of MySQL ??? Jan 10, 2017 at 21:59
  • 1
    Apache should be irrelevant.
    – Rick James
    Jan 11, 2017 at 3:15

1 Answer 1

4

Without seeing any additional information, here is my best guess why MySQL is trying to shutdown for a long time: I suspect mysqld no longer has a socket file.

About 1.5 years ago, I answered mysql restart issue after move database. I learned that mysqld depends on the presence of a socket file. If there is no socket, mysqld just draws lots of dots on the screen and then gives up.

In that old post, I wrote three instructions

  • kill mysqld_safe
  • kill mysqld
  • start mysqld

Please go do this now ...

I have discussed MySQL behavior with the socket file (or lack of it) 4 years ago (See my older post mysql restart won't kill child processes on CentOS)

3
  • 1
    Depending on what exactly led to MySQL being restarted, and how it was restarted, it may be running through a lengthy InnoDB recovery.
    – mustaccio
    Jan 10, 2017 at 22:35
  • 2
    Thanks this worked! i first did sudo /etc/init.d/mysql stop then i ran killall mysqld mysqld_safe and finally service mysql start
    – Hector
    Jan 10, 2017 at 22:35
  • In my case the DB server memory got full. Freeup some memory and try sudo /etc/init.d/mysql stop and then do sudo /etc/init.d/mysql start Sep 18, 2019 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.