Categories
mysql upgrade

Table ‘performance_schema.session_variables’ doesn’t exist

327

After upgrading MySQL to 5.7.8-rc
and loging to server I got error:

Table 'performance_schema.session_variables' doesn't exist

I can’t find any solution for this. Can you help ?

5

  • 2

    Another one. Looks like your upgrade didn’t succeed. You might want to consider doing the upgrade process again (or) re-install 5.7.8-rc version and a restore from DB full backup.

    – Rahul

    Aug 12, 2015 at 14:06

  • 2

    did you run mysql_upgrade to ensure that any changes to core tables/dbs was done?

    – Marc B

    Aug 12, 2015 at 14:06

  • yeah, I made mysql_upgrade, I give it last try and reinstalling it again. If it won’t work I’ll downgrade to 5.6 version

    – Taz

    Aug 12, 2015 at 14:08

  • 30

    I experienced the same issue, to solve it, I run mysql_upgrade -u root -p --force, then I restarted the DB server.

    – robregonm

    Aug 19, 2015 at 19:14

  • If the mysql_upgrade command does not work, then the mysql.performance_schema table may have become corrupted. We had this problem. To fix the problem, we removed the database server using the command: apt-get purge mariadb-client-10.1 mariadb-common mariadb-server-10.1. This removed all database binary, configuration and data file. Next we reinstalled the database server and imported back the databases. After that the database server ran without problems

    Apr 16, 2019 at 5:38

258

The mysql_upgrade worked for me as well:

# mysql_upgrade -u root -p --force
# systemctl restart mysqld

Regards,
MSz.

9

  • 25

    I did need to restart mysqld (mysql.server restart, since I’m using a homebrew install on os x), so this was helpful. Otherwise I got an error about session_variables having the wrong structure.

    Nov 25, 2015 at 19:59

  • Identical behaviour with Homebrew on OS X 10.10.5 (Yosemite). Doing the upgrade also fixes a crash in Sequel Pro 1.1 (build 4499) when attempting to load the database.

    Dec 27, 2015 at 14:01


  • 4

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

    – tread

    Jan 31, 2016 at 11:55

  • 8

    If you’re using brew services you can restart your server with brew services restart mysql.

    Feb 22, 2016 at 23:30

  • 1

    This doesn’t works for me, the correct answer is given by viq. only is needed to enable the show compatibility.

    – kato2

    Jan 11, 2017 at 19:40

258

The mysql_upgrade worked for me as well:

# mysql_upgrade -u root -p --force
# systemctl restart mysqld

Regards,
MSz.

9

  • 25

    I did need to restart mysqld (mysql.server restart, since I’m using a homebrew install on os x), so this was helpful. Otherwise I got an error about session_variables having the wrong structure.

    Nov 25, 2015 at 19:59

  • Identical behaviour with Homebrew on OS X 10.10.5 (Yosemite). Doing the upgrade also fixes a crash in Sequel Pro 1.1 (build 4499) when attempting to load the database.

    Dec 27, 2015 at 14:01


  • 4

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

    – tread

    Jan 31, 2016 at 11:55

  • 8

    If you’re using brew services you can restart your server with brew services restart mysql.

    Feb 22, 2016 at 23:30

  • 1

    This doesn’t works for me, the correct answer is given by viq. only is needed to enable the show compatibility.

    – kato2

    Jan 11, 2017 at 19:40

127

mysql -u app -p
mysql> set @@global.show_compatibility_56=ON;

as per http://bugs.mysql.com/bug.php?id=78159 worked for me.

8

  • 1

    This worked perfectly for me! And I did not have to restart the mysql server which would have been so cumbersome

    – anu.agg

    Jun 2, 2016 at 8:30

  • 4

    I’m sorry, this is a somewhat over-size solution: like using a bazooka to shoot a fly. This compatibility switch has many more effects, you might not want all of them.

    Jul 13, 2016 at 15:10

  • @Tuncay Göncüoğlu what are some of these side effects?

    Nov 5, 2016 at 0:24

  • @katzmopolitan Read up here: dev.mysql.com/doc/refman/5.7/en/… . The changes are mostly related to INFORMATION_SCHEMA handling (security etc), but there are more.

    Nov 7, 2016 at 12:58


  • This worked for me too. The error message I got was from mysqldump. Once I made the suggested change mysqldump worked. Once I had the dump I simply changed the show_compatibility_56 back to OFF.

    – Bryan

    Nov 26, 2016 at 22:27