开放远程连接
5.7
先连接到本地数据库
切换到 mysql 数据库
use mysql |
使用以下命令可以更改远程连接的设置
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; |
刷新权限
flush privileges; |
查询 user 表看看是否生效,如果 ‘%’ ‘root’ 在第一行证明生效了
select host,user from user; |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment