美国服务器在docker内重启mysql服务的方法
1.首先,在命令行中使用以下命令重启docker;
sudo systemctl start docker
2.Docker重启后,列出Docker中创建的容器,查看mysql服务的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服务;
docker restart bd14b4db22c3