I’m getting this error for Mysql container for versio 4.0
2023-08-25T04:00:23.031584Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-08-25T04:00:23.407208Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2023-08-25T04:00:23.410096Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.1.0) starting as process 1
2023-08-25T04:00:23.423182Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-08-25T04:00:23.548477Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2023-08-25T04:00:23.548812Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2023-08-25T04:00:24.021536Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2023-08-25T04:00:24.021999Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2023-08-25T04:00:24.022217Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-08-25T04:00:24.023077Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.1.0) MySQL Community Server - GPL.
2023-08-25T04:00:24.024365Z 0 [System] [MY-015016] [Server] MySQL Server - end.
I’m guessing a bit here, but I think its probably the ownership of those files in db/. lxd docker will map to a uid/gid inside the container, and mysql won’t have access to it.
You could try setting those permissions correctly again:
chown -R 999.999 shared/db
999 being the UID/GID for the mysql user inside the container.