I recently encountered a problem at work. The docker container could not access the host's redis, and the telent6379 port was blocked. After investigation, it was found that the server had a firewall enabled, and the firewall authorized access to port 6379 to the docker0 network card. The operation is as follows:
Additional knowledge: Docker starts the mysql container and an error occurs: Ports are not available: listen tcp 0.0.0.0:3306 The error screenshot is as follows This error is caused by the local port 3306 being occupied. It is likely that MySQL has been installed locally and the MySQL service has been started. Solution 1: Open the service, find the mysql service, stop it, or change the port Then execute the following command
As shown in the figure, the startup is successful Solution 2: Change port mapping
illustrate: -p 3309:3306: -p host port: container port, that is, map the host port 3309 to the container port 3306. When the host logs in to the container database, use the host port, such as 3309. The above solution to the problem that the docker container cannot access the host port is all the content that the editor shares with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of the watch listener example in vue3.0
>>: How to set the width and height of html table cells
Pure front-end implementation:切片上傳斷點續傳.斷點續傳needs ...
HTML tag: superscript In HTML, the <sup> tag...
Code implementation: Copy code The code is as fol...
This article introduces the characteristics of CS...
Preface The computer I use is a Mac, and the oper...
The GROUP BY statement is used in conjunction wit...
Talk about the scene Send Email Embedding HTML in...
Copy code The code is as follows: <html> &l...
1 Check the Linux distribution version [root@type...
Table of contents 1. Scenario 2. Implement IJavaS...
Because if there is no forward slash at the end of...
1. Pull the MySQL image Get the latest MySQL imag...
Previously, https://www.jb51.net/article/205922.h...
Table of contents Preface 1. Iceraven Browser (Fi...
Full-text indexing requires special query syntax....