mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_table_stats`' exists.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have a server. It was running 14.04 and after release of 16.04 got updated. MySQL failed terribly but I got it working by checking update scripts and forcing mysql-upgrade.
Now update of mysql packages ends with:
Setting up mysql-server-5.7 (5.7.13-
Renaming removed key_buffer and myisam-recover options (if present)
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`
mysql_upgrade failed with exit status 5
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
11:13 root@malenstwo:
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`
mysql_upgrade: [ERROR] 1146: Table 'mysql.
mysql_upgrade: [ERROR] 1146: Table 'mysql.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_
mysql.slave_
mysql.slave_
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_
mysql.time_
mysql.time_
mysql.time_
mysql.user OK
The sys schema is already up to date (version 1.5.0).
[.. dropped list of db/tables ..]
Upgrade process completed successfully.
Checking if update is needed.
11:13 root@malenstwo:
Setting up mysql-server-5.7 (5.7.13-
Renaming removed key_buffer and myisam-recover options (if present)
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.13, use --force if you still need to run mysql_upgrade
Setting up mysql-server (5.7.13-
11:14 root@malenstwo:
Will I have to force mysql_upgrade after each package update?
> Will I have to force mysql_upgrade after each package update?
Thank you for taking the time to report this bug and helping to make Ubuntu better.
From the output above it is not clear if this is a local configuration issue or a larger update issue. There are a number of mysql bugs around update/upgrade, due to a number of configuration changes that changed between LTS versions. It does however look like a previous bug you have encountered, namely #1571764.
Without more details of the local configuration or further logs to help determine the root cause, I am going to make this incomplete. If you can provide exact steps so that a developer can reproduce the original problem, then please add them to this bug and change the status back to New.