I've got the same error, although I'm running galera cluster with 3 nodes. I tried following the instructions from InnoDB: Error: Table "mysql"."innodb_table_stats" not found after upgrade to mysql 5.6 but when I get to the step of running the create statements, I get the following error:

Error Code: 1813. Tablespace for table '`mysql`.`innodb_index_stats`' exists.
Please DISCARD the tablespace before IMPORT.

This made no sense to me, and when I tried to use

drop tablespace `innodb_index_stats`;

I got an SQL sysntax error.

1 Answer 1


The problem is actually very simple. Here is what happened

When you installed MySQL, the 5 InnoDB systems tables exist in two places

  • inside /var/lib/mysql/mysql as 5 .frm and 5 .ibd files
  • inside the data dictionary within ibdata1 (InnoDB System Tablespace)

At some point in your installation, you must have deleted ibdata1. This left the 10 InnoDB system table files inside /var/lib/mysql/mysql with no data dictionary entry.


cd /var/lib/mysql/mysql
rm -f innodb_index_stats.frm
rm -f innodb_index_stats.ibd
rm -f innodb_table_stats.frm
rm -f innodb_table_stats.ibd
rm -f slave_master_info.frm
rm -f slave_master_info.ibd
rm -f slave_relay_log_info.frm
rm -f slave_relay_log_info.ibd
rm -f slave_worker_info.frm
rm -f slave_worker_info.ibd

Then, login to MySQL and run the steps from my post : InnoDB: Error: Table "mysql"."innodb_table_stats" not found after upgrade to mysql 5.6


  • Being that this was on a cluster, there was one small change to make in the procedure. I had to do the delete on all the servers first, then run the create statements from the provided link. Thank you for the help!
    – Aaron
    Aug 21, 2015 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.