当前位置: 首页 > news >正文

Ubuntu开放mysql 3306端口

Ubuntu开放mysql 3306端口

    • 1. 检查 UFW 防火墙规则
    • 2. 检查 iptables 规则

1. 检查 UFW 防火墙规则

sudo ufw status verbose | grep 3306

若输出包含 3306/tcp ALLOW,表示端口已开放(如下)

ubuntu@Ubuntu2404:~$ sudo ufw status verbose | grep 3306
3306/tcp                   ALLOW IN    Anywhere
3306/tcp (v6)              ALLOW IN    Anywhere (v6)

‌开放端口命令‌:

sudo ufw allow 3306/tcp
sudo ufw reload

2. 检查 iptables 规则

sudo iptables -L -n | grep 3306
sudo iptables -L -n -t nat | grep 3306  # 检查 NAT 规则

‌开放端口命令‌:

sudo iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
sudo netfilter-persistent save

文章转载自:
http://ateliosis.sxnf.com.cn
http://bagwash.sxnf.com.cn
http://baleful.sxnf.com.cn
http://catalonia.sxnf.com.cn
http://cachinnatoria.sxnf.com.cn
http://busulphan.sxnf.com.cn
http://chiengmai.sxnf.com.cn
http://chic.sxnf.com.cn
http://bachian.sxnf.com.cn
http://bareboat.sxnf.com.cn
http://aptly.sxnf.com.cn
http://choliamb.sxnf.com.cn
http://antepartum.sxnf.com.cn
http://avenue.sxnf.com.cn
http://cantharides.sxnf.com.cn
http://anglo.sxnf.com.cn
http://bespread.sxnf.com.cn
http://catspaw.sxnf.com.cn
http://antiphonary.sxnf.com.cn
http://cheval.sxnf.com.cn
http://calfhood.sxnf.com.cn
http://canarian.sxnf.com.cn
http://bangkok.sxnf.com.cn
http://bloom.sxnf.com.cn
http://burp.sxnf.com.cn
http://ampersand.sxnf.com.cn
http://bandmaster.sxnf.com.cn
http://barolo.sxnf.com.cn
http://aeroginous.sxnf.com.cn
http://birthrate.sxnf.com.cn
http://www.dtcms.com/a/262248.html

相关文章:

  • 现代C++ 文件系统库
  • 【算法设计与分析】(四)Strassen 矩阵
  • games101 作业6
  • C语言中常见字符串处理函数
  • Mybatis多条件查询设置参数的三种方法
  • Vue 3 Teleport 特性
  • [Python] -基础篇3-掌握Python中的条件语句与循环
  • UE5 Grid3D 学习笔记
  • 低延时高速数据链技术在无人平台(无人机无人船无人车)中的关键作用与应用
  • Android大图加载优化:BitmapRegionDecoder深度解析与实战
  • 认知智能平台搭载LLM+RAG,重构行业洞察与决策支持体系!
  • 零基础学习RabbitMQ(5)--工作模式(1)
  • Elasticsearch 索引设计与性能优化实战指南
  • Docker 入门教程(八):Dockerfile
  • MyBatis CRUD 常用动态 SQL 标签整理
  • ​19.自动补全功能
  • Swift 小技巧:用单边区间优雅处理模糊范围
  • 杨洋出席喜临门Ai净眠智能新品发布会 今夜无人失眠
  • 基于Java+Springboot的宠物健康咨询系统
  • tmux-copy mode相关配置文件
  • 小米路由器 AX3000T自定义子网掩码
  • rollupOptions 详细讲解,如何优化性能
  • 07-Seq2Seq英译法案例
  • 模运算优化
  • 用R包mice进行多重插补
  • Git安装全攻略:避坑指南与最佳实践
  • Bugku——WEB篇(持续更新ing)
  • 代理模式 - Flutter中的智能替身,掌控对象访问的每一道关卡!
  • JavaScript中的回调函数详解
  • Springboot 集成 SpringBatch 批处理组件