ubantu18.04 setup problems in mysql8.0 remote connections

In mysql8.0 default configuration file is not bound address, but you can configure their own, in the my.cnf

Here another way:

First, connect to your database to perform:

use mysql;
select host,user from user;

Here you will see the root user's default host is localhost, then we execute:

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

The root of the host can remotely connect to% on behalf of, the implementation here you first test on whether navicat connection

When using navicat connection test, you will be prompted an error can not resolve the host name associated with, this is a problem mysql8 some security policy

Then execute:

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpassword';

 To perform the basic problem is solved here, if you still can not remotely access the words:

First check your connection: It is not bridged, if not , then, turn off the firewall ubantu:

ufw disable

At this point the connection to try again!

 

 

 

 

Guess you like

Origin www.cnblogs.com/rungang/p/11444988.html