Ubuntu – Shutdown hangs on “A stop job is running to for Mysql Community Server”

16.04MySQLshutdown

I'm using MySQL ver 14.14 Distrib 5.7.17 for Linux (x86_64) on Ubuntu 16.04. Whenever I shutdown Ubuntu, it hangs here.

enter image description here

After 10 minutes, it automatically kills the process (my guess). I ran into this problem many times. I did a clean install a few times, it works for a while, but then starts doing the same thing after a few proper shutdowns.

Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing a shutdown like this corrupted my MySQL data. Has anyone else ran into this problem?

Best Answer

Thats because you got problems with timezone settings:

Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).

Running sudo dpkg-reconfigure tzdata should do the trick

Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11

Related Question