ERROR 1130 (HY000): Host ‘192.168.3.238‘ is not allowed to connect to this MySQL server

Problem Description

Unable to connect to MySql8.0 with IP address, the error is as follows:

Host '192.168.3.238' is not allowed to connect to this MySQL server
Solution

1. mysql -u root -pLog in to MySql

2. use mysql;Use mysql database

3. update user set host = '%' where user = 'root';Set the root account to allow remote host access

4. flush privileges;Refresh permissions

insert image description here

Whether the test was successful

Enter mysql -h 192.168.3.238 -u root -pthe connection to MySql through the ip address, and the Welcome prompt appears, the connection is successful!

It aims to stimulate students' interest in learning professional knowledge and skills in the computer field, encourage students to actively and flexibly use computer knowledge and skills to solve practical problems, effectively improve algorithm design, logical reasoning, mathematical modeling, programming implementation and computer system capabilities, and cultivate teamwork Awareness, challenging spirit and innovative ability.

Guess you like

Origin blog.csdn.net/qq_42257666/article/details/123746508