MySQL 8.0以上版本配置访问
1.先进入MySQL的配置项。增加如下配置。
default_authentication_plugin=mysql_native_password
2.通过数据库连接进入数据库。配置下列信息。
select host from user where user = 'root'; update user set host = '%' where user = 'root';
3.然后将第一条配置注释掉。
1.先进入MySQL的配置项。增加如下配置。
default_authentication_plugin=mysql_native_password
2.通过数据库连接进入数据库。配置下列信息。
select host from user where user = 'root'; update user set host = '%' where user = 'root';
3.然后将第一条配置注释掉。