I was running mariadb docker container (image mariadb:10.4.12) by specifying --user UID:GID -v /var/lib/mysql:/var/lib/mysql and the ownership of /var/lib/mysql is UID:GID. The command was running as a non-root user, but failed with the error:
2020-05-12 11:16:43+00:00 [Note] [Entrypoint]: Initializing database files
chown: changing ownership of '/var/lib/mysql/data/': Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user. Check that you have the necessary permissions and try again.
MySQL docker image supports this, see https://hub.docker.com/_/mysql, Running as an arbitrary user.
I also found #59, seems it should support this feature, is there anything I am missing?
I was running mariadb docker container (image mariadb:10.4.12) by specifying
--user UID:GID -v /var/lib/mysql:/var/lib/mysqland the ownership of /var/lib/mysql is UID:GID. The command was running as a non-root user, but failed with the error:MySQL docker image supports this, see https://hub.docker.com/_/mysql,
Running as an arbitrary user.I also found #59, seems it should support this feature, is there anything I am missing?