1.通过sudo docker ps查看发现,mysql一直处于重启状态
sudo docker logs <contain id> 查看具体原因:有错误提示:
2024-06-14T06:12:36.715061Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2024-06-14T06:12:36.715120Z 0 [ERROR] [MY-010119] [Server] Aborting
解决方法: