I am initializing a new MariaDB database. Running docker with a volume to my home directory allows MariaDB to start up just fine:
docker run -it --rm --name mymaria \ -e MYSQL_RANDOM_ROOT_PASSWORD=yes \ -e MYSQL_PASSWORD=p@$$w0rd \ -e MYSQL_DATABASE=myapp \ -e MYSQL_USER=myapp \ -v /home/myuser/mysql:/var/lib/mysql \ mariadb:10.2
However, running the mariadb container with a volume via a mounted directory like so:
docker run -it --rm --name mymaria \ -e MYSQL_RANDOM_ROOT_PASSWORD=yes \ -e MYSQL_PASSWORD=p@$$w0rd \ -e MYSQL_DATABASE=myapp \ -e MYSQL_USER=myapp \ -v /mnt/storage/mysql:/var/lib/mysql \ mariadb:10.2
This configuration returns this from the
docker logs output:
Initializing database 2019-09-23 5:12:13 139724696503616 [ERROR] Can't init tc log 2019-09-23 5:12:13 139724696503616 [ERROR] Aborting Installation of system tables failed! ...
tc.log as some folks have suggested does not work. Restarting mariadb will rewrite
tc.log back into the volume
Perhaps this is a permissions issue? I feel like I've tried every combination of
chown with each directory.
I encounter this issue only with the
10.2 tag and not the
latest. However, for an orchestration I'm working on, it suggests