cPanel & WHM Version 98 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Safe way to restart MySQL service

Jens Kirk shared this idea 2 months ago
Need More Information

Hi

As a server admin we need to restart the MySQL server without risk having corrupt tables afterwards and we cannot use the MySQL service restart feature in WHM.

Instead, we use this safe way:


service crond stop
service exim stop
service httpd stop

Type in "2" to check the current MySQL queries and wait for them to be fully processed. Once that is the case, you can run:

service mysqld restart

After MySQL has been restarted, you need to start the other service as follows:

service httpd start
service exim start
service crond start


Could the above become an icon in the WHM in a future version?

Thank you :-)

Replies (1)

photo
1

Can you tell me what tool it is you're using to perform that restart? Also, I am trying to understand the issue with a restart being performed using the interface which shouldn't cause corruption issues, the full process is well documented here https://dev.mysql.com/doc/refman/5.7/en/server-shutdown.html

photo
1

Can you tell me what tool it is you're using to perform that restart?
I am not using a tool; I am asking if the commands above can become a tool (an icon) in WHM for safe MySQL service restart.

Also, I am trying to understand the issue with a restart being performed using the interface which shouldn't cause corruption issues...

I am happy to hear this because then we don't need a tool, but FastComet (our hoster) says that the commands above are needed and warns us about using the MySQL restart icon in WHM. The FastComet supporters are using these commands for their servers.

photo
Leave a Comment
 
Attach a file