Not the answer you need?
Register and ask your own question!

InnoDB: Error: Tablespace for table "mysql"."innodb_table_stats" is missing.

soul301soul301 EntrantCurrent User Role Beginner
Hi,
I am continuoulsy getting below error in mysql error log file mysql"."innodb_table_stats" is missing.
I am using percona mysql server 5.6

can anyone guide me how to resolve above error.

I have tried following solutions.

1 Removing .ibd and .frm files of below tables and restarted mysql :

innodb_index_stats*
innodb_table_stats*
slave_master_info*
slave_relay_log_info*
slave_worker_info*

2 unable to create tables in mysql :


mysql> CREATE TABLE `innodb_table_stats` (
->
-> `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
->
-> `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
->
-> `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
->
-> `n_rows` bigint(20) unsigned NOT NULL,
->
-> `clustered_index_size` bigint(20) unsigned NOT NULL,
->
-> `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
->
-> PRIMARY KEY (`database_name`,`table_name`)
->
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
ERROR 1050 (42S01): Table '`mysql`.`innodb_table_stats`' already exists

3 unable to drop table :

mysql> drop table innodb_table_stats;
ERROR 1051 (42S02): Unknown table 'mysql.innodb_table_stats'


4 I have also cheked if any orphan table exist :

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE '%#sql%';
Empty set (0.00 sec)


Is there any way I can fix above errors for below system tables ?
Please guide

innodb_index_stats*
innodb_table_stats*
slave_master_info*
slave_relay_log_info*
slave_worker_info*

Regards,
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.