how can create cronjob for restart mysql ?

He3am

Verified User
Joined
Mar 7, 2013
Messages
95
hi
how can create cronjob for every 6 hours restart mysql and litespeed
thanks
 
IMHO, restarting mysql can be dangerous. Can I ask why you wish to do this?

In /etc/crontab add

0 */6 * * * /etc/init.d/mysqld restart
 
Restarting MySQL is indeed not a very good idea - certainly not by cronjob.

On another server, I've got an uptime over a year with MySQL running 1000 Queries per second. it doesn't need to be rebooted
 
Back
Top