Today, the company project needs to configure docker. After successfully installing it on Windows, I found that I could not connect to the local mysql. I keep reporting permission issues or wrong addresses. Finally found 1: The address is according to the following ipv4 2: To open the localhost permission on the host Mysql, the command is as follows
Okay, that’s it. Additional knowledge: The Docker database container cannot be accessed locally, but can be accessed remotely Preface In the past, when I used idea to connect to the docker database on the Alibaba Cloud server, I used the server IP and port number. Later, I felt that the open port number of the security group was not safe, and wanted to use localhost, but found that I could not connect. I thought I could only use the server IP and not localhost, but then I suddenly discovered that each Docker container has its own IP. 1. Enter the container
2. Check IP
You can see that my IP is 172.18.0.2 3. Modify the link address It worked after that. The above docker connection host Mysql operation is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of mysql user variables and set statement examples
>>: DOCTYPE type detailed introduction
First look at the code and effect↓ <style> ...
Table of contents Preface Standard sfc writing me...
Table of contents 1. Security issues with Docker ...
I don’t know if you have noticed that when we ope...
First, let's simulate the data coming from th...
Background: I want to install a SAP ECC server an...
1. The difference between forward proxy and rever...
Table of contents 1. Introduction 2. Use 1. Diffe...
Table of contents pom configuration Setting.xml c...
Description Solution VMware 15 virtual machine br...
MySQL Workbench - Modeling and design tool 1. Mod...
Switching files is a common operation in Linux. W...
The installation tutorial of MySQL 5.7.27 is reco...
This article mainly introduces common strategies ...
This article does not introduce anything related ...