mysql刷新权限命令
flush privileges;
修改root的密码为123456
UPDATE user SET Password = PASSWORD('123456') WHERE user = 'root';
库权限 本质是改了 mysql库user表的host字段
grant all privileges on 库名.* to 用户名@'客户端地址' identified by '123456';
grant all privileges on xxy.* to root@'127.0.0.1' identified by '123456';
grant all privileges on *.* to root@'%' identified by '123456';
开通3306端口 Linux 命令 打开 iptables 3306 端口
#iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
#保存 iptables 规则
#service iptables save
实例
grant all privileges on aipaiaixiang.* to aipaiaixiang@'%' identified by ' 123456';
网友评论