1. View the available versions of MySQL:
docker search mysql
2. Pull the MySQL 5.7 version image:
docker pull mysql:5.7
3. View the mirror:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.7 d54bd1054823 8 days ago 449MB
4. Run the MySQL5.7 image:
docker run -itd --name mysql -p 3307:3306 -e MYSQL_ROOT_PASSWORD=123456 d54bd1054823
5. View the running container:
docker ps
6. Use local Navicat to connect to MySQL 5.7
Port number: 3307
Password: 123456