2021-09-25 02:49:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started. 2021-09-25 02:49:14+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2021-09-25 02:49:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started. mysqld: [Warning] World-writable config file '/etc/mysql/my.cnf' is ignored. 2021-09-25T02:49:14.878098Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2021-09-25T02:49:14.879458Z 0 [Note] mysqld (mysqld 5.7.28) starting as process 1 ... 2021-09-25T02:49:14.881740Z 0 [Note] InnoDB: PUNCH HOLE support available 2021-09-25T02:49:14.881752Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2021-09-25T02:49:14.881754Z 0 [Note] InnoDB: Uses event mutexes 2021-09-25T02:49:14.881756Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2021-09-25T02:49:14.881757Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2021-09-25T02:49:14.881759Z 0 [Note] InnoDB: Using Linux native AIO 2021-09-25T02:49:14.881941Z 0 [Note] InnoDB: Number of pools: 1 2021-09-25T02:49:14.882025Z 0 [Note] InnoDB: Using CPU crc32 instructions 2021-09-25T02:49:14.883068Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2021-09-25T02:49:14.888269Z 0 [Note] InnoDB: Completed initialization of buffer pool 2021-09-25T02:49:14.889777Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2021-09-25T02:49:14.900994Z 0 [ERROR] InnoDB: Unable to open undo tablespace './/undo001'. 2021-09-25T02:49:14.901009Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2021-09-25T02:49:15.502467Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2021-09-25T02:49:15.502516Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2021-09-25T02:49:15.502529Z 0 [ERROR] Failed to initialize builtin plugins. 2021-09-25T02:49:15.502536Z 0 [ERROR] Aborting
一开始我只注意到了Unable to open undo tablespace ‘.//undo001’
网上搜了下,大多都是说找不到这个文件,需要手动备份
但是我docker-compose是写的相对路径的挂载文件,不应该找不到啊
然后我尝试把undolog/undo001文件改成undo0001
重启mysql,仍然报相同的错误
我觉得mysql根本没有读到这个路径,这是为什么呢
仔细看报错发现有段warning
1
World-writable config file '/etc/mysql/my.cnf' is ignored.