Comment 2 for bug 1783182

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

I just tried an Ubuntu release upgrade from Trusty to Xenial with mysql 5.5 installed and configured, and it finished without issues. I even selected that option to not restart services automatically, thinking that would mess up the upgrade, but it still worked.

This is the bit that failed, from your logs:
...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B
Renaming removed key_buffer and myisam-recover options (if present)
start: Job is already running: mysql
invoke-rc.d: initscript mysql, action "start" failed.
invoke-rc.d: release upgrade in progress, error is not fatal
Checking if update is needed.
Checking server version.
Error: Server version (5.5.53-0ubuntu0.14.04.1) does not match with the version of
the server (5.7.22) 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

It looks like maybe mysql didn't stop, and then the subsequent start failed.

There is also this bit in the mysql logs that looks worrisome, as it's about some damaged tables you have in your DB:
Version: '5.5.53-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/freepbx_settings' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/freepbx_settings'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/notifications' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/notifications'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/module_xml' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/module_xml'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/kvstore' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/kvstore'
180723 11:48:52 [ERROR] /usr/sbin/mysqld: Table './asteriskcdrdb/cdr' is marked as crashed and should be repaired
180723 11:48:52 [Warning] Checking table: './asteriskcdrdb/cdr'
180723 12:10:01 [ERROR] /usr/sbin/mysqld: Table './asterisk/admin' is marked as crashed and should be repaired
180723 12:10:01 [Warning] Checking table: './asterisk/admin'

Bottom line, in orther to further troubleshoot this, we will need a way to reproduce the problem. Some simple steps that would show the upgrade failing like in your case. Until then, I'll mark this bug as incomplete.

As for the system as it stands now, I would try:
sudo apt update
sudo apt -f install <--- inspect that output carefully, see what it wants to do

And *maybe* sudo apt dist-upgrade to let it complete the release upgrade, if it was interrupted.