"InnoDB: Plugin initialization aborted with error Generic error"

docker-compose up でMySQLが突然起動しなくなった。

環境

Windows10 Pro 64bit
MySQL 5.7.26
Docker 18.09.2

$ docker logs mysql
2019-07-25T01:19:35.869478Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2019-07-25T01:19:35.875553Z 0 [Note] mysqld (mysqld 5.7.26) starting as process 1 ...
2019-07-25T01:19:35.886548Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-07-25T01:19:35.886610Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-07-25T01:19:35.886616Z 0 [Note] InnoDB: Uses event mutexes
2019-07-25T01:19:35.886620Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-07-25T01:19:35.886623Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-25T01:19:35.886625Z 0 [Note] InnoDB: Using Linux native AIO
2019-07-25T01:19:35.886800Z 0 [Note] InnoDB: Number of pools: 1
2019-07-25T01:19:35.886906Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-07-25T01:19:35.888078Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-07-25T01:19:35.894283Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-25T01:19:35.895966Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpri
ority().
2019-07-25T01:19:35.943909Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-07-25T01:19:35.948800Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 351989124
2019-07-25T01:19:35.948941Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 351990735
2019-07-25T01:19:35.948961Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-07-25T01:19:36.549947Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-07-25T01:19:36.550057Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-07-25T01:19:36.550067Z 0 [ERROR] Failed to initialize builtin plugins.
2019-07-25T01:19:36.550070Z 0 [ERROR] Aborting

2019-07-25T01:19:36.550076Z 0 [Note] Binlog end
2019-07-25T01:19:36.550171Z 0 [Note] Shutting down plugin 'CSV'
2019-07-25T01:19:36.554529Z 0 [Note] mysqld: Shutdown complete

ib_logfile0, ib_logfile1, ibdata1というファイルだけ50Mぐらいサイズがあるのでなんか怪しい。サイズがいっぱいになったのか?

support.plesk.com

  • my.cnfに以下を設定。
volumes:
    - ./db/my.cnf:/etc/my.cnf
[mysqld]
innodb_buffer_pool_size=1G
innodb_log_file_size=50M

ib_logfile0, ib_logfile1をbackupして移動。

docker-compose upで起動するようになった。

やっぱりDBの根本的な知識が欠落してそう。

dev.mysql.com dev.mysql.com qiita.com nippondanji.blogspot.com yakst.com