在docker內(nèi)重啟mysql服務(wù)的方法
1.首先,在命令行中使用以下命令重啟docker;
sudo systemctl start docker
2.Docker重啟后,列出Docker中創(chuàng)建的容器,查看mysql服務(wù)的id;
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd14b4db22c3 centos/mysql-57-centos7 "container-entrypoin…" 22 hours ago Exited (255) 11 minut
3.最后,在命令行中使用以下命令即可重啟mysql服務(wù);
docker restart bd14b4db22c3