Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL usage

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following error was found when connecting to MySQL remotely:

java.sql.SQLException: null, message from server: "Host '192.168.30.23' is not allowed to connect to this MySQL server"

Solution:

Enter MySQL bin directory and execute the following command:

mysql> update user set host = '%' where user = 'root';

mysql> flush privileges;

Many users get the Authentication plugin 'caching_sha2_password' cannot be loaded error when connecting to MySQL databases using Navicat Premium 12.

The reason for this is that the encryption rule before mysql8 is mysql_native_password, and after mysql8, the encryption rule is caching_sha2_password, there are two ways to solve the problem, one is to upgrade the navicat driver, one is to restore the mysql user login password encryption rules to mysql_native_password.

Here is the second way, the solution is as follows

1. Administrator privileges Run command prompt, log in MySQL (remember to add environment variables)

2. Modify account password encryption rules and update user passwords

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Modify encryption rules

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';#Update the user password

3. Refresh permissions and reset password

FLUSH PRIVILEGES; #Refresh permissions

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report