How do you determine why MySQL stops running?
I recently upgraded an Ubuntu server to 16.04, and now MySQL will suddenly stop after a few hours. It's acting as the backend for a Wordpress install. My MySQL version is now:
mysql Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (x86_64) using readline 6.3
Checking who -b
shows the server hasn't rebooted in a few days, so it's not an issue with MySQL not being started properly.
The log /var/log/mysql/error.log
is empty, as well as all the archived ones.
The log /var/log/syslog.log
shows nothing unusual or referencing mysql.
I have the unattended-upgrades
package installed to automatically install security updates, and the log /var/log/unattended-upgrades/unattended-upgrades.log
shows:
2017-03-22 07:00:32,459 INFO Packages that will be upgraded: libc-bin libc-dev-bin libc6 libc6-dev locales multiarch-support
2017-03-22 07:00:32,459 INFO Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
2017-03-22 07:00:38,595 INFO All upgrades installed
2017-03-22 07:00:39,846 ERROR No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably want to install the 'mailx' package.
2017-03-22 07:00:39,846 WARNING Found /var/run/reboot-required, rebooting
indicating it did install some updates, and has scheduled a reboot, but it hasn't rebooted yet.
How do I find out definitively what caused MySQL to stop or crash?