Error mysql Table 'performance_schema...Solution

Error mysql Table 'performance_schema...Solution

The test environment is set up with a mariadb 5.7, using the jdbc driver

<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.1.34</version>
</dependency>

Normal in hibernate project.

I temporarily built a simple jdbc project and found an error when connecting to the database:

Table 'performance_schema.session_variables' doesn't exist

I asked Baidu but to no avail, so I had to upgrade the MySQL driver to 5.1.36 and the problem was solved.

It is understood that:

MySQL 5.5 adds a new storage engine: named PERFORMANCE_SCHEMA, which is mainly used to collect database server performance parameters. MySQL users cannot create tables whose storage engine is PERFORMANCE_SCHEMA. performance_schema provides the following functions: 
1. Provide detailed information about process waiting, including locks, mutex variables, and file information; 
2. Save historical event summary information to provide detailed judgment on MySQL server performance; 
3. It is very easy to add and delete monitoring event points, and the monitoring cycle of the MySQL server can be changed at will, for example (CYCLE, MICROSECOND)

With the above information, the DBA can understand in detail the bottlenecks that may be causing the performance degradation.

It is very simple to enable the performance_schema function and the performance function of some tables. Add performanc_schema to [mysqld] in my.cnf and check whether the performance database is started:

SHOW VARIABLES LIKE 'performance_schema';

If the returned value is ON, it means that the performance database is opened normally.

Thank you for reading, I hope it can help you, thank you for your support of this site!

You may also be interested in:
  • MySQL bypasses granting information_schema objects and reports ERROR 1044 (4200) error
  • MySQL database design: detailed explanation of Schema operation method using Python
  • Explanation of monitoring parameters in performance and sys schema in MySQL 5.7 (recommended)
  • How to use MySQL database analysis tool SchemaSpy
  • Can information_schema and mysql in mysql database be deleted?
  • Parsing MySQL's information_schema database
  • In-depth analysis of MySQL data type DECIMAL
  • Three commonly used MySQL data types
  • About MYSQL, you need to know the data types and operation tables
  • Detailed explanation of the principles and usage of MySQL data types and field attributes
  • Detailed explanation of basic data types in mysql8.0.19
  • Detailed explanation of data types and schema optimization in MySQL

<<:  Vue implements a movable floating button

>>:  How to Easily Remove Source Installed Packages in Linux

Recommend

A brief discussion on the role of the docker --privileged=true parameter

Around version 0.6, privileged was introduced to ...

HTML+CSS to implement the sample code of the navigation bar drop-down menu

Effect The pictures in the code can be changed by...

Why MySQL can ignore time zone issues when using timestamp?

I have always wondered why the MySQL database tim...

How to use ss command instead of netstat in Linux operation and maintenance

Preface When operating and managing Linux servers...

js implements custom drop-down box

This article example shares the specific code of ...

How to implement parent-child component communication with Vue

Table of contents 1. Relationship between parent ...

Guide to Efficient Use of MySQL Indexes

Preface I believe most people have used MySQL and...

Linux automatically deletes logs and example commands from n days ago

1. Delete file command: find the corresponding di...

Introduction to MySQL <> and <=> operators

<> Operator Function: Indicates not equal t...

Detailed process of upgrading gcc (version 10.2.0) under CentOS7 environment

Table of contents Short Introduction 1. Check the...

Common problems and solutions during MySQL MGR construction

Table of contents 01 Common Faults 1 02 Common Fa...

How to run py files directly in linux

1. First create the file (cd to the directory whe...

Application of Hadoop counters and data cleaning

Data cleaning (ETL) Before running the core busin...