+11 votes
2.5k views
in Linux by (26.3k points)
Mysql SQL Service Crashes when daily hit increases, how can I restart it as soon as it crashes?

1 Answer

+23 votes
by (11.7k points)
selected by
 
Best answer

Firstly, you can go to WHM Panel and search for "Service Manager" and select MOnitor option near by MYSQL.

 

If you do not have a WHM panel then go to SSH

Login and

Run this :

crontab -e

and add this code to the file

* * * * * /sbin/service mysql status || service mysql start

this checks every minute MYSQL status and if result is false then run service mysql start command.

Do not forget to save the file.

Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.

Categories

...