如何开启 MySQL 远程登录
第一步登录 mysql
1 | mysql -uroot -proot -h 127.0.0.1 -P 3306 |
第二步,输入一下命令
1 | grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; |
如果是固定 IP 输入下面的命令
1 | grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; |
刷新权限
1 | flush privileges |
评论加载中