当前位置:网站首页>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 --
边栏推荐
- Log4j2 vulnerability detection tool list
- Great changes in the interaction between people and the digital world
- Share a billing system (website) I have developed
- Yunzhisheng atlas supercomputing platform: computing acceleration practice based on fluid + alluxio (Part I)
- Why doesn't anyone read your hard-working blog? Do you really understand the skills of framing, typesetting and drawing?
- How does zhiting home cloud and home assistant access homekit respectively? What is the difference between them?
- Global netizens Yuanxiao created a picture of appreciating the moon together to experience the creativity of Baidu Wenxin big model aigc
- Baidu AI Financing Innovation workshop enrollment!
- Flexible scale out: from file system to distributed file system
- 5 minutes to learn how to install MySQL
猜你喜欢

Log4j2 vulnerability battle case
Why doesn't anyone read your hard-working blog? Do you really understand the skills of framing, typesetting and drawing?
Cloud native 04: use envoy + open policy agent as the pre agent

SQL statement select summary

Splunk series: Splunk installation and deployment (I)
Online yaml to XML tool

Flexible scale out: from file system to distributed file system
Section 13: simplify your code with Lombok
Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing

CSDN sign in cash reward
随机推荐
Vbpr (visual Bayesian personalized ranking) paper summary
8 minutes to understand the wal mechanism of tdengine
Leetcode daily [2022 - 02 - 18]
Mysqldumpslow out slow statements in the database
MySQL installation tutorial
E-commerce project environment construction
Yanjiehua, editor in chief of Business Review: how to view the management trend of business in the future?
Cloud native 04: use envoy + open policy agent as the pre agent
Ensure the decentralization and availability of Oracle network
A new paradigm for large model application: unified feature representation optimization (UFO)
[phase 23] phased summary of spring recruitment practice (Alibaba cloud has OC)
How does zhiting home cloud and home assistant access homekit respectively? What is the difference between them?
MySQL lock
[untitled]
Robotium_ (clickbyid method)
Jingxi Pinpin wechat applet -signstr parameter encryption
Node installation method you don't know
Introduction to the basics of kotlin language: lambda expression
Causes and solutions of unreliable JS timer execution
Server pressure troubleshooting top