document/文档/docker/mysql5.7.md
2024-09-08 22:06:12 +08:00

17 lines
481 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 安装 mysql 5.7
```sh
## 拉去镜像
docker pull mysql:5.7
## 安装
docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql:5.7
## --name mysql5.7:容器的名称。
## -e MYSQL_ROOT_PASSWORD=yourpassword设置 root 用户的密码。
## -d后台运行容器。
## -p 3306:3306 映射端口
#docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
## docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:5.7
```