Detailed process of installing various software for docker under Windows

Time:2021-9-15

First, install mysql

#Download MySQL from docker
docker pull mysql
 
#Start
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql
 
#Enter 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 and log in directly with the root account.
CREATE USER 'yrzsp'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
GRANT ALL PRIVILEGES ON *.* TO 'yrzsp'@'%';

Question:
“1251 client does not support” appears when the client connects to MySQL

在这里插入图片描述

solve
(1) View user information


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

在这里插入图片描述

Note: host% indicates unlimited IP address, and localhost indicates that the local machine uses plugin instead of MySQL_ native_ Password, you need to change the password

(2) Modify user password
① Update the password with user as root and host% as 123456


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

② Update the password of user as root, host as localhost as 123456


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

Connection succeeded

在这里插入图片描述

3. Use MySQL

#Enter container
docker exec -it mysql bash
 
#Login to MySQL
MySQL - U root - P // press enter to enter the password

II. Install redis

1. Install the latest version


docker pull redis:latest

在这里插入图片描述

2. View local image


docker images

在这里插入图片描述

3. Operation container


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

在这里插入图片描述

4. Check the operation


docker ps

在这里插入图片描述

5. Connect to redis


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

在这里插入图片描述

III. installation of 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

在这里插入图片描述

5. Enter the zookeeper container


docker exec -it zookeeper /bin/bash

Enter the bin directory: CD bin/

在这里插入图片描述

6. Connect zkclient.sh


[email protected]:/bin# zkCli.sh

在这里插入图片描述

IV. installing rabbitmq

Installing 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 image ID


docker ps 

在这里插入图片描述

5. Enter rabbitmq

Docker exec - it image ID / bin / Bash

在这里插入图片描述

This is the end of this article about the detailed explanation of various software installed under Windows docker. For more information about windows docker installation, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!