+6 votes
2.3k views
asked in Linux by (9.7k points)

Mysql SQL Service Crashes when daily hit increases, how can I restart it as soon as it crashes?

1 Answer

+8 vote
answered by (10.6k 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

...