当前位置:网站首页>Docker failed to remotely access 3306 after installing MySQL
Docker failed to remotely access 3306 after installing MySQL
2022-06-25 20:48:00 【Nishino_ shou】
In Alibaba cloud server , Installed docker, And after starting the container, install mysql8.0. Connect... In a container mysql Everything is all right , Next, you are ready to use the in this computer navicat visit mysql, The connection error was found 10038. And then began a difficult investigation journey !
First attempt , Because of root Created by the user , Think it is a group problem , So a personal user was created , The result is still not connected , Think of your own installation 8.0 Version of , There may be new features , It is found that the encryption rules of the user password are different ( Specific encryption rules can be queried by yourself ), Old version navicat Not necessarily for , So try to change the user's encryption rules to the old version , Connecting again still fails !
The following figure shows the process of modifying password rules .
View modified results :

After modifying the rule still fails , I wonder if it's the port , So from this telnet ip port , Find out 22 It can be connected normally ,3306 no way , Thought it was the firewall , So the firewall is turned off , Still not .
Check the port started under :
The port information is found to be normal .
This makes me wonder , Then there is a saying in Baidu that Alibaba cloud will have a security policy configuration , Able to add port access settings for the portal , So I went to the Alibaba cloud console and added

A new rule has been added to the security group rules

Finally, the connection was successful !
notes :
In fact, the security group policy was operated before the problem was solved , But it was useless at that time , I wonder if it could be mysql The version is too high , So it was removed 8.0 The container of , again pull 了 5.7 edition , As a result, it exploded , Because I used to pretend a long time ago docker, And what I tried was 5.7 edition , This causes the container to report an error ,run After starting, it is directly disabled . After several twists and turns , I haven't found a good way , You can only uninstall docker, Go through the new process again after reassembly .
So when the uninstall is complete , install docker, The following is the official installation tutorial .Install Docker Engine on CentOS | Docker DocumentationInstructions for installing Docker Engine on CentOShttps://docs.docker.com/engine/install/centos/

After installation according to the en route steps ,pull 了 8.0 Version of mysql And start the , Then go to alicloud and add the configuration of the last step , Try using local navicat Connect , It was a success ..
Problem guess :
1. Adopted mysql8.0 Mirror image , Then the external connection tool shall also adopt the new version as far as possible , For example, my local is navicat15 To connect . Previously used 11 Never . Some bloggers say that mysql5.7-8.0 Two versions , The user password is encrypted in different ways , The new password is not supported by the connection worker . I have also tried this process , The encryption method is rolled back , It's no use .
2. Firewall impact , This is influential , However, my Alibaba cloud server is not turned on at all . This doesn't affect me ..
3. docker Before installation of the container , Better make sure , Whether there is any installation record , In some cases, you need to clear all the old version records in advance , Uninstall and reinstall the existing installation , Avoid mirror conflicts .
4. Alibaba cloud's security policy really didn't expect .. After all, it is the operation and maintenance department that handles this matter , I seldom think about port opening . Fortunately, after tossing and turning, it was done .
The whole process took me about two nights , It's close 4 Hours! . Sure enough, I did it myself , Still have a good attitude , There are many places to step on the pit . then docker I haven't used it much , Not very familiar with , I hope we can make persistent efforts --
边栏推荐
- Live broadcast preview | front line experts invite you to talk: the value of data science enabling multiple application scenarios
- Vbpr (visual Bayesian personalized ranking) paper summary
- Section 13: simplify your code with Lombok
- Solution to big noise of OBS screen recording software
- MySQL lock
- COMP9024
- Global netizens Yuanxiao created a picture of appreciating the moon together to experience the creativity of Baidu Wenxin big model aigc
- Record some questions about MySQL (DNS reverse resolution in Linux)
- JS canvas drawing an arrow with two hearts
- Install and initialize MySQL (under Windows)
猜你喜欢

Install JDK, MySQL and nexus under Linux (tar package installation)
MySQL lock
Section 13: simplify your code with Lombok

Sonar series: continuous scanning through Jenkins integrated sonarqube (IV)
Yanjiehua, editor in chief of Business Review: how to view the management trend of business in the future?
This is a simple and cool way to make large screen chart linkage. Smartbi will teach you

Cvpr2019 | the latest cvpr2019 papers are the first to read!

Heavy update! Yolov4 latest paper! Interpreting yolov4 framework
Attention to government and enterprise users! The worm prometei is spreading horizontally against the local area network
A new paradigm for large model application: unified feature representation optimization (UFO)
随机推荐
Share a billing system (website) I have developed
[machine learning] machine learning from zero to mastery -- teaching you how to use decision tree to predict contact lens types
node. JS express connect mysql write webapi Foundation
Must see the summary! In depth learning era, you should read 10 articles to understand image classification!
About eruake learning
[machine learning] machine learning from zero to mastery -- teach you to recognize handwritten digits using KNN
The latest promo! 1 minute to understand the charm of the next generation data platform
Leetcode topic [array] -33- search rotation sort array
Talking about the foundation of function test today
Feature Engineering in simple terms – a practice guide based on openmldb (Part 1)
Those high-frequency and real software test interview questions sorted out by the test director in 7 days, come to get
Png to NII
Popular understanding of deviation and variance in machine learning
Recommend a free screen recording software
[distributed system design profile (1)] raft
MySQL lock
Leaflet modify popup style
Lesson 1 Preparation
Leetcode daily question - 27 Remove element (simple)
Understanding C language structure pointer