mysql数据库权限设置

insert into user(host, user, password) values("%", "root", password("yourpassword"))

grant all privileges on portal to 'web_db'@'%' with grant option; // 分配权限

revoke all privileges on *.* from 'web_db'@'%' with grant option; // 取消授权

revoke  all on *.* from 'web_db'@'%';

flush privileges; // 刷新权限

bind-address            = 0.0.0.0 // 允许从任何IP连接

bind-address            = 127.0.0.1 // 只允许本机连接

protected-mode no  redis 保护模式,禁止远程连接,开启yes no关闭

猜你喜欢

转载自bestscw.iteye.com/blog/2389724