首页 > 数据库技术 > 详细

mysql 远程访问 配置

时间:2014-03-26 09:43:11      阅读:473      评论:0      收藏:0      [点我收藏+]

sudo vi /etc/mysql/my.cnf

  找到bind-address = 127.0.0.1

  注释掉这行:#bind-address = 127.0.0.1

  或者改为: bind-address = 0.0.0.0 (允许任意IP访问)

  或者自己指定一个IP地址。

 

mysql -h localhost -uroot -p

  Grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘password‘ with grant option;

  flush privileges;

 

sudo /etc/init.d/mysql restart

mysql 远程访问 配置,布布扣,bubuko.com

mysql 远程访问 配置

原文:http://www.cnblogs.com/Hero-Qiang/p/3622638.html

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