10.1 Docker部署应用-Mysql8.0
推荐Mysql8.0, 其拥有更多新特性,如支持NO SQL,原生分布式, 支持UTF8-mb4, 取消了myisam. 最重要是性能大幅提升.
安装环境
Linux系统:Ubuntu 16.04
docker版本:18.09.5
mysql版本: 8.0.16
部署思路
- OS切换到root用户,并启动docker
$ su root
$ docker pull mysql:8.0.16
- 拉取mysql 8.0 镜像
docker pull mysql:8.0.16
root@instance-o70no2nw:~# su root
root@instance-o70no2nw:~# docker pull mysql:8.0.16
latest: Pulling from library/mysql
27833a3ba0a5: Pull complete
864c283b3c4b: Pull complete
cea281b2278b: Pull complete
Digest: sha256:f5f78fe2054b4686da3fddb460eab0b53d04e067c977d6a02fcb5ec25375ed15
Status: Downloaded newer image for mysql:8.0.16
- 创建并启动容器 (重要)
思路:Mysql可用,需保以下几点: