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
相关推荐
一 乐7 小时前
婚纱摄影网站|基于ssm + vue婚纱摄影网站系统(源码+数据库+文档)
前端·javascript·数据库·vue.js·spring boot·后端
C_心欲无痕7 小时前
ts - tsconfig.json配置讲解
linux·前端·ubuntu·typescript·json
冰西瓜6008 小时前
国科大2025操作系统高级教程期末回忆版
linux
1.14(java)8 小时前
SQL数据库操作:从CRUD到高级查询
数据库
HIT_Weston8 小时前
93、【Ubuntu】【Hugo】搭建私人博客:面包屑(一)
linux·运维·ubuntu
Full Stack Developme9 小时前
数据库索引的原理及类型和应用场景
数据库
cuijiecheng20189 小时前
Linux下Beyond Compare过期
linux·运维·服务器
HIT_Weston9 小时前
92、【Ubuntu】【Hugo】搭建私人博客:侧边导航栏(六)
linux·运维·ubuntu
CodeAllen嵌入式9 小时前
Windows 11 本地安装 WSL 支持 Ubuntu 24.04 完整指南
linux·运维·ubuntu
IDC02_FEIYA10 小时前
SQL Server 2025数据库安装图文教程(附SQL Server2025数据库下载安装包)
数据库·windows