Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

[fedora/mariadb] can't create database directory '/var/lib/mysql/data/mysql #257

Open
bitchecker opened this issue Jun 25, 2017 · 1 comment

Comments

@bitchecker
Copy link

i'm trying to run docker image fedora/mariadb with a simple directory mount for store dbms data.

i run

docker run -d --name db01 -p 3306:3306 -v /path/dbms/db01:/var/lib/mysql/data fedora/mariadb

but i see that container doesn't start and if i run docker logs db01 i see:

Fatal error can't create database directory '/var/lib/mysql/data/mysql'
mkdir: cannot create directory '/var/lib/mysql/data/mysql': Permission Denied

host directory has the same permissions of the user that is trying to run the container.

@bitchecker
Copy link
Author

[update]

if you run docker run -d --name db01 -p 3306:3306 --user ${UID} -v /path/dbms/db01:/var/lib/mysql/data fedora/mariadb where ${UID} has the same of the user that is running container, it seems to works for mount point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant