Wednesday, May 01, 2019

Problems with MySQL after an unattended-upgrades

Wake up this Labor Day to a couple of emails from the Monit on remote a server, reporting a problem with the MySQL process.
Checking the emails from that server, this is what the unattended-upgrades email reported:

Checking if update is needed.
Checking server version.
Error: Server version (5.7.25-0ubuntu0.16.04.2) does not match with the version of
the server (5.7.26) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
mysql_upgrade failed with exit status 3
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script\
 returned error exit status 1

Got onto the server, and this is what the MySQL error log (/var/log/mysql/error.log) reported:

2019-05-01T06:25:42.111425Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2019-05-01T06:25:42.111470Z 0 [Note] InnoDB: Check that you do not already have another mysqld\
 process using the same InnoDB data or log files.

So, this usually means that there are more than one MySQL server running.
First thing first, stop MySQL, and then, kill any other MySQL process by hand.
Then, run apt-get update && apt-get dist-upgrade, this finished the MySQL update A Ok.
Then started the MySQL server, and everything was kosher.

Labels: , , , ,

0 Comments:

Post a Comment

<< Home