debugsqlModerate
InnoDB: Error: Table “mysql”.“innodb_table_stats” not found
Viewed 0 times
errorinnodbmysqlfoundinnodb_table_statstablenot
Problem
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:
This made no sense to me, and when I tried to use
I got an SQL sysntax error.
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.
Solution
The problem is actually very simple. Here is what happened
When you installed MySQL, the 5 InnoDB systems tables exist in two places
At some point in your installation, you must have deleted
SOLUTION
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
GIVE IT A TRY !!!
When you installed MySQL, the 5 InnoDB systems tables exist in two places
- inside
/var/lib/mysql/mysqlas 5.frmand 5.ibdfiles
- 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.SOLUTION
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.ibdThen, 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
GIVE IT A TRY !!!
Code Snippets
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.ibdContext
StackExchange Database Administrators Q#111616, answer score: 10
Revisions (0)
No revisions yet.