rhel 9 mysql 无法远程访问(linux)

1.防火墙开启3306端口

bash 复制代码
firewall-cmd --add-port=3306/tcp

2.防火墙生效

bash 复制代码
firewall-cmd --runtime-to-permanent

3.其他命令(停止和启动防火墙)

bash 复制代码
systemctl stop firewalld
systemctl start firewalld

4.检查防火墙状态

bash 复制代码
firewall-cmd --check-config

5.查看防火墙开启端口

bash 复制代码
firewall-cmd --list-ports

6关闭防火墙端口

bash 复制代码
firewall-cmd --remove-port=port-number/port-type
相关推荐
三言老师26 分钟前
秘诀-如何远程SSN访问家里的八台电脑(frp 实操方案)
linux·运维·ssh
布莱克6051 小时前
理解 MySQL 架构:从连接层到存储引擎
mysql
举手2 小时前
Dispatcher模块剖析
linux·c++
围炉聊科技2 小时前
长期免费的数据库方案——零成本基建系列
数据库
AC赳赳老秦3 小时前
公开图片 OCR 数据提取:OpenClaw 合规采集公开信息图,识别文字与表格并转化为结构化数据
java·大数据·前端·数据库·python·php·openclaw
allforgood3 小时前
运行容器
linux
Light_It4 小时前
Linux 内核参数 pci-stub.ids=
linux·kernel
梁辰兴4 小时前
软件工程:数据结构设计
数据库·软件工程·设计原则·设计方法·梁辰兴·数据库结构设计·数据库结构类型
RisunJan4 小时前
Linux命令-scriptreplay(终端会话回放)
linux·运维·chrome
spencer_tseng5 小时前
[kylin & linux] install docker
linux·docker·kylin