5

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?

BenMorel
  • 700
  • 1
  • 11
  • 36
Hector
  • 155
  • 1
  • 1
  • 4

1 Answers1

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)

RolandoMySQLDBA
  • 182,700
  • 33
  • 317
  • 520
  • 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 '17 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 '17 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 – Dnyaneshwar Harer Sep 18 '19 at 13:56