安裝5.7的版本
可以改一下docker的源
docker pull mysql:5.7
docker pull mysql:5.7
docker images
docker ps -a
docker run \
--name mysql \
-d \
-p 3306:3306 \
--restart unless-stopped \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
mysql:5.7
docker exec -it mysql /bin/bash
mysql -uroot -p123456
Docker 安裝 (完整詳細版)
https://blog.csdn.net/BThinker/article/details/123358697
Docker 安裝 Mysql 容器 (完整詳細版)
https://blog.csdn.net/BThinker/article/details/123471514
mysql登入報錯:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)