1、先重新启动服务器的docker

[rpin-docke ~]# sudo systemctl start docker

2、查看docker中运行的容器,包括运行中的和销毁的容器

[rpin-docke ~]# docker ps -a

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

bd14b4db22c3 centos/mysql-57-centos7 "container-entrypoin…" 22 hours ago Exited (255) 11 minutes ago 0.0.0.0:3306->3306/tcp tensquar

3、重新启动mysql

[rpin-docke ~]# docker restart bd14b4db22c3

bd14b4db22c3

再次查看是否启动成功:

[rpin-docke ~]# docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

bd14b4db22c3 centos/mysql-57-centos7 "container-entrypoin…" 22 hours ago Up 8 seconds 0.0.0.0:3306->3306/tcp tensquare_mysql

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐