MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
770 stars 438 forks source link

Unable to execute mariadb #349

Closed whyoon closed 3 years ago

whyoon commented 3 years ago

I am using mariadb in the docker of the synology. mariadb will not run after the synology is restarted as shown below. How can I recover it? Please help me.

2021-02-19 22:00:32+09:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started.
2021-02-19 22:00:33+09:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-02-19 22:00:33+09:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started.
2021-02-19 22:00:34 0 [Note] mysqld (mysqld 10.5.8-MariaDB-1:10.5.8+maria~focal) starting as process 1 ...
2021-02-19 22:00:34 0 [Note] InnoDB: Using Linux native AIO
2021-02-19 22:00:34 0 [Note] InnoDB: Uses event mutexes
2021-02-19 22:00:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-02-19 22:00:34 0 [Note] InnoDB: Number of pools: 1
2021-02-19 22:00:34 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-02-19 22:00:34 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-02-19 22:00:34 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-02-19 22:00:34 0 [Note] InnoDB: Completed initialization of buffer pool
2021-02-19 22:00:34 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-02-19 22:00:34 0 [Note] InnoDB: 128 rollback segments are active.
2021-02-19 22:00:34 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-02-19 22:00:34 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-02-19 22:00:34 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-02-19 22:00:34 0 [Note] InnoDB: 10.5.8 started; log sequence number 889916432; transaction id 378
2021-02-19 22:00:34 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-02-19 22:00:34 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
2021-02-19 22:00:34 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2021-02-19 22:00:34 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-02-19 22:00:34 0 [Note] Server socket created on IP: '::'.
2021-02-19 22:00:34 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
2021-02-19 22:00:34 0 [ERROR] Aborting
wglambert commented 3 years ago

Were any permissions changed when synology was restarted? NAS can be kind of finnicky with UID's and all that but otherwise if it was an unclean shutdown it could be some sort of corruption.

There was this issue where the [ERROR] lines are the same as yours, but there wasn't any commented solution on what might have caused those specific errors https://github.com/docker-library/mariadb/issues/330#issuecomment-721479491

But I would try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum

grooverdan commented 3 years ago

Unlike #330 you have data evidenced by log sequence number 889916432; transaction id 378

Try running the container with --skip-grant-tables to get past the errors.

Then if it starts:

I would like to know the history how you got into this state so hopefully it can be avoided.