最近发现博客有时候会挂,发现是 mysql 的容器停了,然后 start 之后恢复了,然后又会不知什么时候自己挂掉 我用的是 docker 官方的 mysql 镜像,启动方式应该也没问题
docker run --name=mysql1 -p 3306:3306 -d mysql/mysql-server
docker logs mysql1 只发现这些重复的日志:
2019-10-20T06:42:28.442743Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 1 2019-10-20T06:42:29.685793Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2019-10-20T06:42:29.734558Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2019-10-20T06:42:29.962637Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-10-20T06:42:30.374853Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.
2019-10-20T06:42:30.538051Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
请问我该如何定位容器崩溃的原因。