title: 远程连接阿里云mysql数据库
date: 2018-12-17 18:59:50
tags:远程连接阿里云mysql数据库
1.连接到阿里云服务器
ssh root@阿里云外网IP
输入密码
2.登录到阿里云mysql数据库
mysql -uroot -p密码
遇到问题为:
Access denied for user 'root'@'182.149.161.239'(using password:no)
解决方案:
GRANT ALL PRIVILEGES ON . TO 'root' @'%' IDENTIFIED BY'1107' WITH GRANT OPTION;
flush privileges;
3.在服务器端->安全组->添加安全规则->为端口3306授权

image.png

image.png