当前位置:网站首页>服务器的数据库连不上了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
边栏推荐
- 程序员如何提升自己的格局?
- 示例项目:简单的六足步行者
- Interval DP (gravel consolidation)
- Information collection of penetration test
- OSI seven layer model
- 项目中批量update
- Codasip为RISC-V处理器系列增加Veridify安全启动功能
- 移动办公时如何使用frp内网穿透+teamviewer方式快速连入家中内网主机
- Six common transaction solutions, you sing, I come on stage (no best, only better)
- Batch update in the project
猜你喜欢
一文搞定vscode编写go程序
单商户 V4.4,初心未变,实力依旧!
Subclasses and superclasses of abstract classes
Data communication foundation ACL access control list
Intelligent metal detector based on openharmony
17. [stm32] use only three wires to drive LCD1602 LCD
Data communication foundation - route republication
18.[STM32]读取DS18B20温度传感器的ROM并实现多点测量温度
超分辨率技术在实时音视频领域的研究与实践
六种常用事务解决方案,你方唱罢,我登场(没有最好只有更好)
随机推荐
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
Coding devsecops helps financial enterprises run out of digital acceleration
异常com.alibaba.fastjson.JSONException: not match : - =
Data communication foundation - Ethernet port mirroring and link aggregation
抽象类和接口的区别
ES6深入—async 函数 与 Symbol 类型
ES6 drill down - Async functions and symbol types
《MongoDB入门教程》第04篇 MongoDB客户端
ES6深入—ES6 Generator 函数
Pits encountered in the use of boolean type in development
Vulnhub-Moneybox
Verilog realizes the calculation of the maximum common divisor and the minimum common multiple
Value series solution report
移动办公时如何使用frp内网穿透+teamviewer方式快速连入家中内网主机
Appium automation test foundation - appium basic operation API (II)
Five common negotiation strategies of consulting companies and how to safeguard their own interests
Codasip adds verify safe startup function to risc-v processor series
Data communication foundation smart_ Link_&_ Monitor_ Link
示例项目:简单的六足步行者
开发中Boolean类型使用遇到的坑