Environment: MacOS_Cetalina_10.15.1, Mysql8.0.18, Docker_2.0.0.3 1. Search mysql in docker repository docker search mysql 2. Pull mysql8.0 from the docker repository docker pull mysql:8.0 Remark: docker pull mysql //Pull the latest version by default 3. Check whether the local warehouse image is downloaded successfully docker images mysql:8.0 4. Install and run the mysql8.0 container docker run -p 3307:3306 --name mysql8.0 -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0 Remark: -p maps the local host port to the docker container port (because the local port 3306 is already occupied by other versions, use 3307) --name container name -e configuration information, configure root password -d image name 5. Check the running status of mysql8.0 container docker ps 6. Docker logs in to MySQL docker exec -it mysql8.0 bash mysql -uroot -p 7. Use the client connection tool (navicat) to remotely log in to MySQL I found that I couldn't log in. The error message was: Navicat does not support the caching_sha_password encryption method. Reason: MySQL 8.0 uses a new password encryption method: caching_sha_password 8. Use the client connection tool (navicat) to remotely log in to MySQL again 9. Postscript (commonly used docker commands) docker search image name //Search for imagesdocker pull image name: version number //Pull the image of the corresponding versiondocker pull image name //Pull the latest image by defaultdocker images //View the locally downloaded imagesdocker ps //View the running containersdocker ps -a //View all containers (including those in run, stop, and exited states) docker container ls //View running containersdocker rm container ID //Only delete containers that are not runningdocker rm -f container ID //Can delete running containersdocker run -p local host port number: container service port number--name container name[-e configuration information modification] -d image namedocker start container ID //Start containerdocker stop container ID //Terminate containerdocker rmi image name orID //Delete image The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Use of Linux network configuration tools
>>: Detailed code for implementing 3D tag cloud in Vue
Because some dependencies of opencv could not be ...
1. Description Earlier we talked about the instal...
Zabbix automatically discovers rules to monitor s...
The format is simple: proxy_pass URL; The URL inc...
Table of contents 1. Background 2. Prerequisites ...
Table of contents Character Set Comparison Rules ...
In development, it is often necessary to cache th...
webpack-dev-server core concepts Webpack's Co...
Table of contents 1. Introduction 2. The differen...
Because of network isolation, MySQL cannot be ins...
1. Cancel the dotted box when the button is press...
I accidentally discovered a great artificial inte...
Today, CSS preprocessors are the standard for web...
Table of contents Scenario Analysis Development S...
error message: ERROR 2002 (HY000): Can't conn...