Categories
mysql

Native table ‘performance_schema’.’???’ has the wrong structure

I am getting the following:

Native table 'performance_schema'.'file_instances' has the wrong structure
Native table 'performance_schema'.'cond_instances' has the wrong structure
Native table 'performance_schema'.'rwlock_instances' has the wrong structure
Native table 'performance_schema'.'mutex_instances' has the wrong structure
...

And on it goes
These errors come up when I restart MySql. It seems to cause MySql Administrator to become unstable, I get a lot of:

"MySQL server has gone away"

Apparently MySQL schema storage is broken due to a reason. These reasons may be:

  • You have broken the database information_schema
  • File system corrupted or some bugs in the file system damaged the database.
  • MySQL internals broke the schema database due to a bug in MySQL (maybe nobody encountered it before).

If you don’t have backups however you are still able to access your data, first backup your data then do the following:

If you have backups, then reinstall MySQL (before that completely clear all data of mysql) and then import your data.