首页 > 数据库技术 > 详细

mysql不能使用IP连接,可以使用localhost连接

时间:2017-06-06 20:16:00      阅读:284      评论:0      收藏:0      [点我收藏+]

问题:

本地mysql,使用127.0.0.1可以连接成功,使用具体IP连接报错
ERROR 1130 (HY000): Host ‘10.252.225.125‘ is not allowed to connect to this MySQL server
 

解决方法:给数据库授权

进入mysql命令行界面,使用命令【grant all privileges on *.* to ‘用户名’@‘IP‘ identified by ‘密码‘;】
grant all privileges on *.* to ‘root‘@‘10.252.225.125‘ identified by ‘123456‘;
 

mysql不能使用IP连接,可以使用localhost连接

原文:http://www.cnblogs.com/meitian/p/6953327.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!