全站数据
8 4 2 0 5 8 1

linux系统怎么打开3306端口

爹地爱学习 | 简单学习,快乐成才!         
问题更新日期:2024-04-20 05:26:59

问题描述

linux系统怎么打开3306端口希望能解答下
精选答案
最佳答案

linux中mysql的3306端口默认是打开的,如果没有打开需要设置防火墙开放3306端口,防火墙开放3306端口的命令为:

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

# Firewall configuration written by system-config-firewall

# Manual customization of this file is not recommended.

:INPUT ACCEPT [0:0]

:FORWARD ACCEPT [0:0]

:OUTPUT ACCEPT [0:0]