navicat cannot connect to mysql super detailed processing method

637366cd54634c91a938e6084289eafa.jpg

 wrong reason:

The local IP (xxx.xxx.xxx.xxx) does not have permission to access the remote database.

solve:

This paragraph is a pure solution, explained below

First open the administrator window, and then look directly at the picture below37a6c03754704b83afd45921830511d2.png

 The code that needs to be used is placed here for easy access

1.mysql -uroot -p

2.use mysql;

3.update user set host = '%' where user = 'root';

4.flush privileges;

5.select user,host from user;

The following is the detailed process

1. Open the administrator window

3dc0704803304eecaae79a726ad3c3ce.jpg

 2. Log in to the mysql server

Enter this statement: mysql -uroot -p, then enter your password37cc5edf6ce14464b2806085431e902d.png

 

3. Use mysql database

Enter this statement: use mysql;

c485a08c8b3245619472858cd5cdc36d.png

 4. Update user permissions

Enter this statement: update user set host = '%' where user = 'root';

56237a4526e448909f321d0e811de004.png

 5. Refresh permission, this must have

Enter this statement: flush privileges;

521a2997525e4771b499383de1547fa1.png

 6. Check for success

Enter this statement: select user,host from user;

If root, the corresponding percent sign (%)

congratulations on your success

8eac9210e197436391bef6e16b839be8.png

 

 

 

Supongo que te gusta

Origin blog.csdn.net/m0_60817176/article/details/125035561
Recomendado
Clasificación