首页 > 技术文章 > mysql客户端连不上数据库

yang--yang 2017-09-27 16:39 原文

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 

 

推荐阅读