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 -p
Log 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
Whether the test was successful |
---|
Enter mysql -h 192.168.3.238 -u root -p
the 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.