Custom table 'performance_schema'. '???' has the wrong structure

I get 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 it goes on. These errors occur when I restart MySql. It looks like the MySql admin is becoming unstable, I get a lot:

 "MySQL server has gone away" 
+63
mysql
Jun 09 2018-11-11T00:
source share
8 answers

The MySQL schema store seems to be corrupted for a reason. These reasons may include:

  • You have violated the information_schema database
  • The file system is damaged or some errors in the file system are damaged in the database.
  • MySQL internal databases broke the schema database due to an error in MySQL (perhaps no one had met before).

If you do not have backups, you can still access your data, first back up your data, and then follow these steps:

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

-6
Jun 09 2018-11-11T00:
source share

Try the following command in the shell (the root user is the mysql root user, not the system root)

 sudo mysql_upgrade -u root -p 

After starting, make sure to restart mysql (all @Mikepote credits in the comments.)

+218
Nov 28 '13 at 9:56 on
source share

In my case, it appeared when a particular query was launched in a table.

And the magazine also contains:

Missing system table mysql.proxies_priv; run mysql_upgrade to create it

I started mysql_upgrade , after which the problem disappeared.

+22
Oct 20 2018-11-11T00:
source share

I had this problem, the answer was here @Berend de Boer

Reboot mysql after upgrade.

[ERROR] Native table performance table has the wrong structure

+15
Aug 26 '16 at 19:28
source share

This error occurs when installing MySQL on top of a previous installation that was configured without a performance scheme or an older version of the performance scheme, in which all current tables may be missing.

I also ran into this problem on mamp . To solve this problem, I did the following:

 cd /Applications/MAMP/bin/ sudo ./upgradeMysql.sh 

Remember to restart the MySQL server.

You can read the Performance Schema assembly configuration for more details.

+4
Jun 14 '17 at 2:57
source share

If the database is an Akonadi database (KDE), the above will not be enough. You need to display the options provided by your mysqld with

 ps aux | grep mysql 

Copy the parameters to mysql_upgrade commands (I don't need "-u root -p", but you could)

 mysql_upgrade --defaults-file=/home/USER/.local/share/akonadi/mysql.conf --datadir=/home/USER/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-USER.x0Bvxr/mysql.socket 

I really think the --socket key is the key.

+2
Jan 08
source share

Try mysql_upgrade and then restart mysql and bring it back.

0
Aug 01 '18 at 15:30
source share

Yes, mysql_upgrade answer worked for me as well. A server having problems was cloned from a production server, and performance_schema was never migrated successfully. Just make sure mysql is running before entering the mysql_upgrade command, and then, as already mentioned, restart mysql.

0
Jun 12 '19 at 18:54
source share



All Articles