Detailed process of installing various software in Docker under Windows

Detailed process of installing various software in Docker under Windows

1. Install MySQL

# Download mysql in docker
docker pull mysql
 
#Start docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql
 
#Enter the container docker exec -it mysql bash
 
#Login to mysql
mysql -u root -p //Press Enter to enter the password ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
 
#Add a remote login user. You can also log in directly with the root account.
CREATE USER 'yrzsp'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
GRANT ALL PRIVILEGES ON *.* TO 'yrzsp'@'%';

question:
When the client connects to MySQL, "1251 client does not support ...

insert image description here

Solution (1) View user information

select host,user,plugin,authentication_string from mysql.user; 

insert image description here

Note: host is % means no restriction on IP. localhost means the local machine uses plugin other than mysql_native_password, then you need to change the password

(2) Change the user password ① Update user to root, host to % and password to 123456

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';

② Update user to root, host to localhost and password to 123456

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

Connection successful

insert image description here

3. Using MySQL

#Enter the container docker exec -it mysql bash
 
#Login to mysql
mysql -u root -p //Enter password

2. Install Redis

1. Install the latest version

docker pull redis:latest 

insert image description here

2. View local image

docker images 

insert image description here

3. Run the container

docker run -itd --name redis -p 6379:6379 redis 

insert image description here

4. Check the operation status

docker ps 

insert image description here

5. Connect to redis

docker exec -it redis-test /bin/bash
redis-cli 

insert image description here

3. Install Zookeeper

Download Zookeeper

docker pull zookeeper

View Mirror

docker images

Start mirroring and map ports

docker run --rm --name zookeeper -p 2181:2181 -d zookeeper

View Container

docker ps 

insert image description here

5. Enter the Zookeeper container

docker exec -it zookeeper /bin/bash

Enter the bin directory: cd bin/

insert image description here

6. Connect zkClient.sh

root@6ec49958c478:/bin# zkCli.sh 

insert image description here

4. Install RabbitMQ

Install RabbitMQ

docker pull rabbitmq:3.7.7-management

View Mirror

docker images

Run RabbitMQ

docker run -d --name rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3.7.7-management

View the image id

docker ps 

insert image description here

5. Enter rabbitmq

docker exec -it image id /bin/bash 

insert image description here

This is the end of this article about the detailed explanation of various software installations of Docker under Windows. For more relevant Windows Docker installation content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install WSL2 Ubuntu20.04 on Windows 10 and set up the docker environment
  • Detailed tutorial on installing Docker on Windows
  • How to install Docker on Windows Server 2016
  • How to install Docker on Windows 10
  • A brief discussion on the installation and use of Docker on Windows platform
  • How to change the installation location of Docker for Windows pull image file
  • The configuration process of installing docker window under Windows system
  • Tutorial on installing Docker on Windows

<<:  Summary of several principles that should be followed in HTML page output

>>:  The basic use of html includes links, style sheets, span and div, etc.

Recommend

Centos7 mysql database installation and configuration tutorial

1. System environment The system version after yu...

How to use jsx syntax correctly in vue

Table of contents Preface Virtual DOM What is Vir...

Example of CSS3 to achieve div sliding in and out from bottom to top

1. First, you need to use the target selector of ...

Two ways to completely delete users under Linux

Linux Operation Experimental environment: Centos7...

A performance bug about MySQL partition tables

Table of contents 2. Stack analysis using pt-pmap...

How to export mysql table structure to excel

The requirements are as follows Export the table ...

MySQL performance optimization: how to use indexes efficiently and correctly

Practice is the only way to test the truth. This ...

HTML form tag tutorial (2):

This tutorial introduces the application of vario...

Basic usage of exists, in and any in MySQL

【1】exists Use a loop to query the external table ...

Detailed explanation of the concept of docker container layers

Table of contents 01 Container consistency 02 Con...

Solution to the problem of eight hours difference in MySQL insertion time

Solve the problem of eight hours time difference ...

Implementation of docker-compose deployment of zk+kafka+storm cluster

Cluster Deployment Overview 172.22.12.20 172.22.1...