· 7 years ago · Sep 06, 2018, 01:40 AM
12018-09-06T01:27:56.710923Z 284261 [ERROR] InnoDB: Column table_name in table `mysql`.`innodb_table_stats` is VARCHAR(576) NOT NULL but should be VARCHAR(192) NOT NULL (length mismatch).
22018-09-06T01:27:56.711052Z 284261 [ERROR] InnoDB: Fetch of persistent statistics requested for table `mydatabase`.`mytable` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
3
4drop TABLE if exists `innodb_table_stats`;
5CREATE TABLE if not exists `innodb_table_stats` (
6 `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
7 `table_name` varchar(192) COLLATE utf8_bin NOT NULL,
8 `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
9 `n_rows` bigint(20) unsigned NOT NULL,
10 `clustered_index_size` bigint(20) unsigned NOT NULL,
11 `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
12 PRIMARY KEY (`database_name`,`table_name`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
14flush tables;