0
点赞
收藏
分享

微信扫一扫

腾讯云阿里云配置 mysql开放3306端口

本地安装mysql

安全组设置入站规则

服务器iptables 开发3306端口

iptables-services安装

yum install iptables-services
systemctl enable iptables

vi /etc/sysconfig/iptables

-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
 

mysql中对ip进行授权

​​Host 'xxx' is not allowed to connect to this MySQL server.​​

  1. 为新用户分配权限

授予用户通过外网IP对于该数据库的全部权限

grant all privileges on ​​root​​.* to 'root'@'%' identified by 'xxx';

  1. 刷新授权

flush privileges;

举报

相关推荐

0 条评论