码迷,mamicode.com
首页 > 数据库 > 详细

mysql客户端连不上数据库

时间:2017-09-27 17:36:38      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:table   start   系统防火墙   登录   with   linu   火墙   pre   grant   

GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;
flush privileges;


root 用户名
123456 密码

如果还无法登录就关闭系统防火墙


在linux关闭防火墙可以这样:
1. 重启系统生效 
开启: chkconfig iptables on 
关闭: chkconfig iptables off

2. 即时生效,重启后失效 
开启: service iptables start 
关闭: service iptables stop 

 

mysql客户端连不上数据库

标签:table   start   系统防火墙   登录   with   linu   火墙   pre   grant   

原文地址:http://www.cnblogs.com/yang--yang/p/7602547.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!