mysql stopped suddenly, how to auto restart automatically?
Always got my mysql service stopped suddenly hence my wordpress site stopped running.
Firstly I would like to know, what causing this problem?
Which log should I check?
Then I would like to know how to solve this problem?
Thanks
5 Replies
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log
As referenced from other discussion, I suggested to have crontab to start sql service.
55 5 * * * root service mysql status || service mysql start
and run crontab -l
no crontab for root
yet the problem persists.
Thanks
As for monitoring I use monit
You should also check your syslog for out of memory errors, it's possible you're running out of memory the linux kernel is killing off mysql to recover ram.
Maybe you should "heed" it as a sign you need to learn how to properly optimize web sites before throwing in the towel.