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

Detailed explanation of several methods of installing software in Linux

1. RPM package installation steps: 1. Find the co...

How to extend Vue Router links in Vue 3

Preface The <router-link> tag is a great to...

How to build a SOLO personal blog from scratch using Docker

Table of contents 1. Environmental Preparation 2....

Markup Language - Phrase Elements

Click here to return to the 123WORDPRESS.COM HTML ...

Example of how to import nginx logs into elasticsearch

The nginx logs are collected by filebeat and pass...

Build a Docker private warehouse (self-signed method)

In order to centrally manage the images we create...

Table related arrangement and Javascript operation table, tr, td

Table property settings that work well: Copy code ...

Deploy the Vue project on a Linux server

Case 1 vue-cli builds the vue3 project, uploads t...

Detailed explanation of two ways to dynamically change CSS styles in react

The first method: dynamically add a class to show...

Summarize the common application problems of XHTML code

Over a period of time, I found that many people d...

Differentiate between null value and empty character ('') in MySQL

In daily development, database addition, deletion...

CentOS 6-7 yum installation method of PHP (recommended)

1. Check the currently installed PHP packages yum...

Analysis of the implementation principle of Vue instructions

Table of contents 1. Basic Use 2. Working Princip...