[英]How can I restore a MySQL Docker container that has crashed
After updating, my WordPress stopped connecting to the MySQL DB on docker.更新后,我的 WordPress 停止连接到 docker 上的 MySQL 数据库。
So as of now, I start Docker, see the following logs:所以截至目前,我启动 Docker,查看以下日志:
2022-02-14 02:28:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2022-02-14 02:28:07+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-02-14 02:28:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2022-02-14T02:28:08.102455Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-02-14T02:28:08.102491Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28) starting as process 1
2022-02-14T02:28:08.144825Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-02-14T02:28:08.625666Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-02-14T02:28:58.896407Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'DROP SCHEMA IF EXISTS dd_upgrade_garbage_80028' failed with error code = 3664, error message = 'Failed to delete SDI 'dd_upgrade_garbage_80028.columns' in tablespace 'mysql'.'.
2022-02-14T02:28:58.905477Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-02-14T02:28:58.905864Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-02-14T02:28:59.332262Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28) MySQL Community Server - GPL.
Now as its a docker with a volume attached to /var/lib/mysql现在作为它的 docker 有一个附加到 /var/lib/mysql 的卷
I have all the data files, but as the server keeps on restarting, I have a very small window to run any commands on docker.我有所有的数据文件,但随着服务器不断重启,我有一个非常小的 window 可以在 docker 上运行任何命令。
This problem may occur if the MySQL container stops abnormally MySQL容器异常停止可能会出现这个问题
First, make a backup of the data directory of MySQL container首先备份MySQL容器的数据目录
You can try to upgrade the MySQL container version.可以尝试升级MySQL容器版本。 Can you fix this problem
你能解决这个问题吗
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.