首先,连接阿里云主机并登录数据库,

1、添加一个Host    ***注意这里数据库为mysql5.7或以上password字段修改成了authentication_string;

mysql>select User,Password,Host from mysql.user;   

insert into user (User,Password,Host)values('root',password('root'),'%');

数据库远程连接配置

2、为'%'添加权限

[mysql]> grant all privileges on *.* to 'root'@'%' identified by 'root';

数据库远程连接配置

3、刷新权限

[mysql]> flush privileges

//以前的解决方案到这就结束了,但通过navicat依然连接不上。

数据库远程连接配置

4、在阿里云上配置安全组规则

数据库远程连接配置

数据库远程连接配置

数据库远程连接配置

数据库远程连接配置

数据库远程连接配置

数据库远程连接配置

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-04-04
  • 2021-09-24
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-01-03
  • 2021-06-19
  • 2022-02-23
相关资源
相似解决方案