当前位置:Gxlcms > 数据库问题 > 远程连接阿里云的mysql数据库

远程连接阿里云的mysql数据库

时间:2021-07-01 10:21:17 帮助过:45人阅读

 

第二步

进入mysql

mysql -uroot -p

授权

grant all privileges on *.* to root@"%" identified by "root密码" with grant option;

刷新

flush privileges;

退出

exit

 

第三步

重启mysql服务

service mysql restart

 

如还不行

检查阿里云是否开放3306端口

 

额外

切换mysql数据库

use mysql;

查看用户表  (localhost只允许本地访问,%可远程访问)

select host,user from user;

更新用户表

update user set ‘host‘ = ‘%‘ where ‘user‘ = ‘root‘ LIMIT 1;

 

远程连接阿里云的mysql数据库

标签:重启   远程访问   res   date   密码   切换mysql   localhost   版本问题   bin   

人气教程排行