现在的位置: 首页 > 综合 > 正文

配置本机PC作为MySql Host

2014年02月15日 ⁄ 综合 ⁄ 共 360字 ⁄ 字号 评论关闭

作个项目,之前在本机测试,数据都存到本机的MySql数据库里,用localhost访问。

现在想让组里其他人都能访问这个数据库,做了如下处理:

在`mysql`.`user`表里允许any host, 以“%”表示:

update `mysql`.`user` 
set host='%' 
where user='root' and host='127.0.0.1';
flush privileges;

如果出现“Unable to connect any of the specified MySQL hosts”,则把本机的防火墙先关闭,再试。

不过,这种方法很不安全就是了,不建议使用。

Unable to connect to any of the specified MySQL hosts

Unable to connect to any of the specified MySQL hosts

抱歉!评论已关闭.