How to solve the client and server connection (mysql): "xxx.xxx.xxx.xxx" is not allowed to connect to this mysql serve

xiaoxiao2021-03-06  56

1. Enter MySQL and create a new user Xuys:

Format: GRANT Permissions ON Database Name. Table Name User @ Login Host Identified by "User Password";

Grant SELECT, UPDATE, INSERT, DELETE ON *. * to Xuys@192.168.88.234 identified by "xuys1234";

View the result, execute:

Use mysql;

SELECT HOST, USER, Password from User;

You can see the Xuys users who have just created in the USER table. The Host field represents the host of the login, and its value can be used by IP, or the host name can be used.

When the value of the HOST field is changed, it means that you can log in to the MySQL server on any client machine, it is recommended to set to% in development.

Update user set host = '%' where user = 'xuys';

2, ./mysqladmin-uroot -p21century reload

. /MYSQLADMIN -UROOT -P21CENTURY SHUTDOWN

3,. / Mysqld_safe --user-root &

Remember: Any modifications to the authorization form need to be reloaded to execute step 3.

If the above three steps or cannot be connected to the client, do the following, insert a record in the DB table of the MySQL database:

Use mysql;

INSERT INTO DB VALUES ('192.168.88.234', '%', 'xuys', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y' , 'Y', 'Y', 'Y', 'Y');

Update db set host = '%' where user = 'xuys';

Repeat the above 2nd, 3.

转载请注明原文地址:https://www.9cbs.com/read-114687.html

New Post(0)