Docker一键部署MySQL 8
脚本下载
下载路径:mysql8.0.20.sh
使用FTP 工具或rz 命令将脚本上传到服务器
授权
[root@xxx~]# chmod +x mysql8.0.20.sh
执行脚本
[root@iZm5e4qautzfi19sq8s7aeZ ~]# ./mysql8.0.20.sh
初始化MySQL部署...
拉取MySQL 8.0.20 镜像...
8.0.20: Pulling from library/mysql
8559a31e96f4: Pull complete
d51ce1c2e575: Pull complete
c2344adc4858: Pull complete
fcf3ceff18fc: Pull complete
16da0c38dc5b: Pull complete
b905d1797e97: Pull complete
4b50d1c6b05c: Pull complete
c75914a65ca2: Pull complete
1ae8042bdd09: Pull complete
453ac13c00a3: Pull complete
9e680cd72f08: Pull complete
a6b5dc864b6c: Pull complete
Digest: sha256:8b7b328a7ff6de46ef96bcf83af048cb00a1c86282bfca0cb119c84568b4caf6
Status: Downloaded newer image for mysql:8.0.20
docker.io/library/mysql:8.0.20
启动MySQL容器...
de8d83b67ffd9e6944bcfe4a52c480b82d9d3ed11f573781f8d43a5d073da0aa
配置MySQL允许远程连接...
the input device is not a TTY
MySQL已经部署完成,并已配置允许远程连接。