The cloud server has opened the security group 8080, 3306 and other ports and still cannot access Tomcat, Mysql and other services

1. Port test

netstat -tunlp |grep 8080
netstat -tunlp |grep 3306
netstat -tunlp |grep 22

2. Firewall operation

1、查看firewall服务状态
systemctl status firewalld
2、查看firewall的状态
firewall-cmd --state
# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭
service firewalld stop

3. mysql configure external network access

netstat -an|grep 3306

If the following picture appears, it means that only local
Insert picture description here

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

Comment out the following bind-address = 127.0.0.1 and
Insert picture description here
restart the server

reboot

Guess you like

Origin blog.csdn.net/qq_41170600/article/details/106884705