Como corrigir Docker MariaDB não iniciando "upgrade ... required but skipped due to $MARIADB_AUTO_UPGRADE"

Problema:

Seu container MariaDB / MySQL não inicia devido a

mariadb_entrypoint_log.txt
mariadb_1    | 2024-05-27 03:03:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.3.2+maria~ubu2204 started.
mariadb_1    | 2024-05-27 03:03:20+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
mariadb_1    | 2024-05-27 03:03:20+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb_1    | 2024-05-27 03:03:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.3.2+maria~ubu2204 started.
mariadb_1    | 2024-05-27 03:03:21+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required
mariadb_1    | 2024-05-27 03:03:21+00:00 [Note] [Entrypoint]: MariaDB upgrade (mariadb-upgrade or creating healthcheck users) required, but skipped due to $MARIADB_AUTO_UPGRADE setting
mariadb_1    | 2024-05-27  3:03:21 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32186)
mariadb_1    | 2024-05-27  3:03:21 0 [Warning] Changed limits: max_open_files: 1024  max_connections: 151 (was 151)  table_cache: 421 (was 2000)

Solução

Adicione

docker-compose-mariadb-upgrade.yml
- MARIADB_AUTO_UPGRADE=1

à seção environments do seu docker-compose.yml.

Então, reinicie o container. MariaDB então fará auto-upgrade de si mesmo.


Check out similar posts by category: Docker