当前位置:网站首页>记一次云服务器配置mysql 远程连接失败的解决方案
记一次云服务器配置mysql 远程连接失败的解决方案
2022-04-22 03:36:00 【_夕】
云服务器系统版本为ubuntu,笔者跟着网上的教程 ->我是教程 高兴地配了半天mysql,本地运行没问题,在设置远程连接访问权限的时候没有注意到mysql8和mysql5版本之间的指令区别,权限设置失败。本来端口已经可以访问了,之后又阴差阳错地下载了firewalld防火墙软件,导致与ubuntu自带的ufw发生了冲突,导致远程无法访问该端口。之后使用
firewall-cmd --state
systemctl start firewalld
(添加)firewall-cmd --permanent --zone=public --add-port=8180/tcp
(移除)firewall-cmd --zone=public --remove-port=8080/tcp --permanent
firewall-cmd --reload
firewall-cmd --permanent --zone=public --list-ports
systemctl start firewalld.service
系列指令又将3306端口开放了一次,这才得以成功连接。
总结一下,远程连接失败通常有两种原因,一种是没有开放远程用户连接的权限,一种是端口没有成功打开。这次的配置失败是这两种情况的混合,浪费了我大量时间。
解决方案:1.注意到自己使用的mysql版本与网上教程并不一致,调整查找目标。
2.没事不要乱下载防火墙,注意与原生防火墙的冲突问题。后续将firewalld卸载或者停止服务也能解决问题。
防火墙冲突
配不成功浑身难受,配成功了也浑身难受。
版权声明
本文为[_夕]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_45685193/article/details/124308276
边栏推荐
- Quantitative evaluation rules for security evaluation of commercial password applications (2021 Edition)
- 关于TP5出现的一些错误
- 2021-10-21 software testing theory
- The WiFi button of win11 is missing and cannot be connected to the Internet
- Deep learning and image recognition: principle and practice notes day_ thirteen
- 安装node环境
- Pycharm jumps to the specified line
- On August 16, 2021, a bug in Zhengfang educational administration system was accidentally found
- Implementation of small cases
- Record of problems in socket multicast
猜你喜欢

Zhongshanghui ⺠ evolution of trading platform architecture: response to Apache shardingsphere

GPU深度学习环境配置
![C language daily question -- [noip2008] ISBN number (question 76 of niuke.com)](/img/a5/d6869747e2a61d076b4763021be123.png)
C language daily question -- [noip2008] ISBN number (question 76 of niuke.com)

Solution | fast intercom dispatching system: efficient cooperation

Learning neural network drawing Matplotlib

Redis persistence

Baidu offline map research and development -- laravel framework

Guitar music theory finishing

php. Ini configuration

The first day of C language daily question
随机推荐
吉他乐理整理
Oracle architecture
2022年当选IEEE Fellow的人员列表
VOS3000 8.05安装及源码
What is Polyfill?
What is the future direction of GPU?
DR/AP4029 outdoor IPQ-4019/4029 Outdoor directional-antennas
Let others connect to their own MySQL database and share the MySQL database
解决方案| 快对讲调度系统:高效协作
[knowledge atlas] catalogue of financial securities knowledge atlas projects
C language constant, string, escape character, initial level of annotation
An article gives you a preliminary understanding of the basic knowledge of C language operators
TP5在制作二维码
C language daily question -- [noip2008] ISBN number (question 76 of niuke.com)
Zhongshanghui ⺠ evolution of trading platform architecture: response to Apache shardingsphere
Career development and employment guidance for college students MOOC Fuzhou University test questions and answers
Rasa dialogue robot serial 2 lesson 121: the actual operation of Rasa dialogue robot debugging project: the whole process demonstration of e-commerce retail dialogue robot operation process debugging-
[server data recovery] a data recovery case in which multiple hard disks of server raid6 are offline successively
Use of logical backup MySQL dump in MySQL
2500 words, hands take you to a preliminary understanding of static keywords, pointers and structures