服务器:腾讯云服务器

操作系统:centos 7.5

lnmp 版本:1.7

MySQL 版本:5.7

1、root 用户登录 MySQL:

mysql -uroot -p

2、添加远程登录用户:

create user 'user'@'%' identified by '123456';

3、设置权限:

grant all on *.* to 'user'@'%';

4、打开防火墙配置文件:

vi  /etc/sysconfig/iptables

5、最下面新增一行:

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

6、重启防火墙:

service  iptables restart

7、查看开放端口:

 netstat -ntlp

腾讯云服务器 lnmp 开启 MySQL 远程访问权限

 

 

Enjoy it !

相关文章:

  • 2021-11-17
  • 2021-08-30
  • 2021-08-16
  • 2021-12-19
  • 2021-09-24
猜你喜欢
  • 2021-12-29
  • 2021-11-25
  • 2021-07-14
  • 2021-06-13
相关资源
相似解决方案