在mariadb官方Docker图像上出现InnoDB错误

hujrc8aj  于 2022-11-08  发布在  Docker
关注(0)|答案(3)|浏览(246)

我遇到了一个非常奇怪的错误。我已经能够把它归结为一个非常简单的情况,我不知道我是否发现了一个错误,或者我错过了一些要点。
问题是我需要一个mariadb容器,我可以用下面的命令完美地运行它:

docker run -e MYSQL_ROOT_PASSWORD=my-secret-pw mariadb

但是,对于以下docker-compose.yml文件,它会失败:

wordpress_db:
  image: mariadb
  environment:
    - MYSQL_ROOT_PASSWORD=foo

除其他外,它还输出:

wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: The  InnoDB memory heap is disabled

第一个我可以清楚地识别为错误的消息是:

wordpress_db_1 | InnoDB: No valid checkpoint found.

(You可以在帖子末尾看到完整的输出)
如果我将mariadb切换为mysql,则不会发生这种情况。
有人能帮我吗?
谢谢你!

输出:

Starting miqueladell_wordpress_db_1
Attaching to miqueladell_wordpress_db_1
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] mysqld (mysqld 10.1.10-MariaDB-1~jessie) starting as process 1 ...
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using mutexes to ref count buffer pool pages
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: The InnoDB memory heap is disabled
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Memory barrier is not used
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Compressed tables use zlib 1.2.8
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using Linux native AIO
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using SSE crc32 instructions
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Initializing buffer pool, size = 256.0M
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Completed initialization of buffer pool
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Highest supported file format is Barracuda.
wordpress_db_1 | InnoDB: No valid checkpoint found.
wordpress_db_1 | InnoDB: If this error appears when you are creating an InnoDB database,
wordpress_db_1 | InnoDB: the problem may be that during an earlier attempt you managed
wordpress_db_1 | InnoDB: to create the InnoDB data files, but log file creation failed.
wordpress_db_1 | InnoDB: If that is the case, please refer to
wordpress_db_1 | InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Plugin 'InnoDB' init function returned error.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] Plugin 'FEEDBACK' is disabled.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Unknown/unsupported storage engine: InnoDB
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Aborting
wordpress_db_1 |
miqueladell_wordpress_db_1 exited with code 1
gfttwv5a

gfttwv5a1#

我在Docker Hub的Maria_DB官方图像上也遇到了同样的问题。它曾经在Maria_DB版本10. 5上工作过一次,但是当我降级到10. 3时,我遇到了同样的错误。
该错误是由先前容器的体积引起的,您必须将其删除。
首先,停止容器(您可以使用docker ps获取docker cotnainer id):

docker stop xxxxx

然后将其移除:

docker rm xxxxx

最后,删除关联的容器:

docker volume ls
docker volume rm my_volume_name

您的容器现在应该可以重新启动,没有任何问题。

0sgqnhkj

0sgqnhkj2#

这对我有用,

docker-compose up -d

然后

docker-compose down -v

您可能需要删除该卷并重新创建它。有关详细信息,
https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks/#removing-docker-volumes。

cbwuti44

cbwuti443#

我不知道这是否应该是一个评论或答案,但我不想达到字符限制,所以...
主要是为了回答@tjheslin1,我怀疑这对其他人有什么用处。
我已经好几个月没有使用Docker了,但是在某个时候,我确实设法用下面的代码使它工作:
https://github.com/MiquelAdell/mariadb-utf8mb4/blob/master/Dockerfile
我不知道是什么,我当时的环境有很多移动的碎片。
我现在没有时间重新创造这样的环境来提供更多的帮助,但我不想让那些在那里跌跌撞撞的人永远等待。
我想我应该结束这个问题作为未回答,因为我将无法跟进它的任何时间很快。
抱歉:-\

相关问题