当前位置:网站首页>服务器的数据库连不上了2003,10060“Unknown error“【服务已起、防火墙已关、端口已开、netlent 端口不通】
服务器的数据库连不上了2003,10060“Unknown error“【服务已起、防火墙已关、端口已开、netlent 端口不通】
2022-07-05 15:35:00 【牛哄哄的柯南】
服务器的数据库连不上了【服务已起、防火墙已关、端口已开、netlent 端口不通】
首先说明:这篇文章针对 服务已经起来了、防火墙是关闭的、安全组端口也打开了,在docker 容器中可以连接MySQL,但是Navicat中不能连,同时 netlent IP 端口 也不同,Navicat报错如下:

如果你也是这种奇葩问题,你可以看下下面的解决方案。
首先确认下防火墙状态
systemctl status firewalld

没毛病,在关着。
再看下端口
netstat -antulp | grep XXXX

也没毛病,docker mysql 起来端口就在使用,docker mysql 关闭的话,端口就未使用
自己确认下自己服务器的安全组对应的端口是否打开了
telnet IP 端口 测试连接下

结果是连接失败,没事,接着往下
执行命令:cat /proc/sys/net/ipv4/ip_forward

注意,这里是0,是不对的,0表示
ipv4转发出于关闭状态我们需要修改成 1
执行命令echo 1 > /proc/sys/net/ipv4/ip_forward

这样我们就
开启了ipv4转发
Navicat 重连

OK,这样就搞定了,不知因为什么原因导致 ipv4转发 关闭了
可能的原因:
重启服务器后被恢复了
部分进程可能修改了系统设置
我们把ipv4转发打开就好了,因为 服务器里面部署容器的话是需要开启ip转发功能的,一般不需要我们自己处理的,不知为啥遇到了,我们开启就可以解决问题了。
版权声明:
原创博主:牛哄哄的柯南
博主原文链接:https://keafmd.blog.csdn.net/
个人博客链接:https://www.keafmd.top/
看完如果对你有帮助,感谢点击下面的点赞支持!
[哈哈][抱拳]
加油!
共同努力!
Keafmd
边栏推荐
- obj集合转为实体集合
- Coding devsecops helps financial enterprises run out of digital acceleration
- Quick completion guide for manipulator (IX): forward kinematics analysis
- 移动办公时如何使用frp内网穿透+teamviewer方式快速连入家中内网主机
- Defining strict standards, Intel Evo 3.0 is accelerating the upgrading of the PC industry
- obj解析为集合
- 20.[STM32]利用超声波模块和舵机实现智能垃圾桶功能
- F. Min cost string problem solving Report
- [Netease Yunxin] research and practice of super-resolution technology in the field of real-time audio and video
- verilog实现计算最大公约数和最小公倍数
猜你喜欢

SQL injection sqllabs (basic challenges) 1-10

Analytic hierarchy process of mathematical modeling (including Matlab code)

Information collection of penetration test

抽象类和接口的区别

五种常见的咨询公司谈判策略以及如何维护自己的利益

ES6深入—async 函数 与 Symbol 类型

Arduino controls a tiny hexapod 3D printing robot

ES6深入—ES6 Generator 函数

CISP-PTE之PHP伪协议总结

Codasip为RISC-V处理器系列增加Veridify安全启动功能
随机推荐
Nine hours, nine people, nine doors problem solving Report
17.[STM32]仅用三根线带你驱动LCD1602液晶
19.[STM32]HC_ SR04 ultrasonic ranging_ Timer mode (OLED display)
sql中set标签的使用
sql中查询最近一条记录
漫画:什么是分布式事务?
verilog实现计算最大公约数和最小公倍数
Clock switching with multiple relationship
The list set is summed up according to a certain attribute of the object, the maximum value, etc
Noi / 1.5 37: mercenaries
漫画:什么是蓝绿部署?
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
Replknet: it's not that large convolution is bad, but that convolution is not large enough. 31x31 convolution. Let's have a look at | CVPR 2022
19.[STM32]HC_SR04超声波测距_定时器方式(OLED显示)
OceanBase社区版之OBD方式部署方式本地安装
Noi / 1.4 07: collect bottle caps to win awards
2.3 learning content
五种常见的咨询公司谈判策略以及如何维护自己的利益
Basic JSON operations of MySQL 5.7
项目中批量update