Problems and solutions encountered when deploying a project when upgrading the Mysql database from version 5.6.28 to version 8.0.11

Problems and solutions encountered when deploying a project when upgrading the Mysql database from version 5.6.28 to version 8.0.11

The problems and solutions encountered when deploying the project during the upgrade of MySQL database version from 5.6.28 to 8.0.11 are described in detail as follows:

First of all, this project uses hibernate4.2.0, and there is no problem connecting to mysql5.6.28. After changing to 8.0.11, an error is reported when starting

1.Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set

If an error occurs, configure it

There is no error when starting the project, but an error is reported when accessing the project

2. Access error com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client

The reason is: the configuration process of Authentication Method during the installation of mysql8 is based on different encryption methods. If you choose the first strong encryption method, the phenomenon I described before will occur; you should choose the second authentication method, that is, keep the old encryption method.

So there are 3 solutions:

1. Reinstall mysql8, and select the second option to keep the old encryption method.

2.MySQL Installer can directly modify the Authentication Method configuration

3. Directly execute statement modification

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (0.11 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

Note: root is the username, localhost refers to the local machine, mysql_native_password is the old password verification mechanism, and 123456 is the password

Summarize

The above is the problems and solutions encountered in the process of deploying the project when upgrading the Mysql database from version 5.6.28 to version 8.0.11. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Centos 6.4 source code installation mysql-5.6.28.tar.gz tutorial
  • MySQL 5.6.28 installation and configuration tutorial under Linux (Ubuntu)
  • MySQL 8.0.11 installation summary tutorial diagram
  • Ubuntu MySQL version upgraded to 5.7

<<:  Two implementations of front-end routing from vue-router

>>:  Raspberry Pi msmtp and mutt installation and configuration tutorial

Recommend

Analysis of the principle and usage of MySQL custom functions

This article uses examples to illustrate the prin...

MySQL free installation version configuration tutorial

This article shares the MySQL free installation c...

Detailed explanation of how to cleanly uninstall Docker

First, the server environment information: Reason...

js to create a carousel effect

I think the carousel is a relatively important po...

How to use js to determine whether a file is utf-8 encoded

Conventional solution Use FileReader to read the ...

Detailed explanation of mktemp, a basic Linux command

mktemp Create temporary files or directories in a...

Explanation of the usage scenarios of sql and various nosql databases

SQL is the main trunk. Why do I understand it thi...

Detailed explanation of asynchronous iterators in nodejs

Table of contents Preface What are asynchronous i...

MySQL 5.6.33 installation and configuration tutorial under Linux

This tutorial shares the installation and configu...

Summarize the problems encountered in using Vue Element UI

Table of contents 1. DateTimePicker date selectio...

JavaScript imitates Jingdong carousel effect

This article shares the specific code for JavaScr...