原文网址:https://www.youyong.top/article/1158e24e5977
MySQL 无法通过外网连接
原文网址:https://www.youyong.top/article/1158e24e5977
MySQL 无法通过外网连接
原文网址:https://www.youyong.top/article/1158e24e5977
在 MySQL 的 bin 目录下执行:
登陆到数据
mysql -uroot -p密码
use mysql;
select host,user,password from user;
可以看到 user 为 root,host 为 localhost 的话,说明 MySQL 只允许本机连接,那么外网,本地软件客户端就无法连接了。
执行如下命令:
update user set host='%' where user ='root';
flush privileges;
查看是否修改正常:
对于设置其他用户远程连接的方法:
GRANT ALL PRIVILEGES ON 数据库名.* TO 账户@"%" IDENTIFIED BY "密码";
flush privileges;
可以测试外网连接 MySQL 服务器。
共 0 条留言
阿里云·业务运营团队内部的前端构建和工程化工具 Dawn开源
Ubuntu安装MySQL提示Depends: mysql-server-5.5 but it is not going
Linux screen 提示:There is no screen to be resumed matching
iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评
资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样
手机扫一扫
分享文章