mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_table_stats`' exists.

Bug #1621389 reported by Marcin Juszkiewicz
14
This bug affects 3 people
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-0ubuntu0.16.04.2) ...
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`.`innodb_table_stats`' exists.
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:mysql# mysql_upgrade -f
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_table_stats`' exists.
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_index_stats`' exists.
mysql_upgrade: [ERROR] 1146: Table 'mysql.innodb_table_stats' doesn't exist
mysql_upgrade: [ERROR] 1146: Table 'mysql.innodb_index_stats' doesn't exist
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_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
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:mysql# LC_ALL=C dpkg --configure -a
Setting up mysql-server-5.7 (5.7.13-0ubuntu0.16.04.2) ...
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-0ubuntu0.16.04.2) ...
11:14 root@malenstwo:mysql#

Will I have to force mysql_upgrade after each package update?

Revision history for this message
Joshua Powers (powersj) wrote :

> 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.

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-5.7 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.