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 // 只允许本机连接
扫描二维码关注公众号,回复:
325558 查看本文章
protected-mode no redis 保护模式,禁止远程连接,开启yes no关闭