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

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

sudo mysql_upgrade -u root -p

sudo service mysql restart

Make sure to restart mysql after running this (All credit to @Mikepote in the comments.)


Im my case it appeared when specific query was run on a table.

And log also contained:

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

I've run mysql_upgrade and after that problem has gone.


This error is encountered when you installed MySQL over a previous installation that was configured without the Performance Schema or an older version of Performance schema that may not have all the current tables.

I also encountered this issue on mamp. To resolve it, I have executed the following:

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

Remember to restart the mysql server.

You can read the Performance Schema Build Configuration for more details.


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

Restart mysql after the upgrade.

[ERROR]Native table performance schema has the wrong structure

Tags:

Mysql