Table 'performance_schema.session_variables' doesn't exist

独自空忆成欢 提交于 2019-11-28 23:46:56
  1. First upgrade your MySql Server to solve the issue by running this command:

    mysql_upgrade -u root -p --force

  2. Then restart the server:

Solved... I opened cmd then :

cd [installation_path]\eds-binaries\dbserver\mysql5711x86x160420141510\bin

then executed this command line :

mysql_upgrade -u root -p --force

A server Restart is needed!

Performance schema is not installed by default.
For checking, you can run the command

SHOW VARIABLES LIKE 'performance_schema';

Suppose, now you will see OFF

To enable it, start the server with the performance_schema variable enabled. For example, use these lines in your my.cnf file:

[mysqld]
performance_schema=ON

More details you can found in official documentation:

https://dev.mysql.com/doc/refman/en/performance-schema-quick-start.html

Here's how to fix it (from the command line):

mysql -u {user} -p
mysql> set @@global.show_compatibility_56=ON;

In /etc/my.cnf:

show_compatibility_56 = 1

this one really works for me without upgrading mysql. After this you need to restart mysql.

As some people asked about the part of the server restart, i will post my answer considering that part:

1 .Go to the directory of the MySQL installation folder in my case it was: C:\Program Files\MySQL\MySQL Server 5.7\bin.

  1. Open CMD in this directory, then Run "mysql_upgrade -u root -p" command.

  2. If your schema was protected by a password, you should enter the password when it is requested.

  3. This will make checking of all tables of all schema, so you should wait until the checking is finished.

  4. At the end the following message should appear:

Upgrade process completed successfully.

Checking if update is needed.
  1. Restart the MySQL server and router services:
open task manager-->services-->right click on the services MySQL 
server and MySQL router-->restart them.
  1. Connect to your server using your workbench, it should connect.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!