I am running the docker command as root.
Root is the owner of all the directories.
Both on the container and host id -u root
returns 0.
I found something interesting though.
After doing stat command on the mysql.log
file, on my host, it turned out it’s Uid
and Gid
are 999, which is “lxd”. I never changed it to that and I forgot to mention that I’m running another database using lxd, which I wanted to get rid of after moving completely to Docker and I never thought it could interfere with Docker, at least not in that way. I’ll dig a bit more, weird that I haven’t thought about checking that sooner.
EDIT: Sorry, but I was mistaken. Both Uid
and Gid
are 999 on host and container, but on host the name is lxd
, which I guess is just a left-over user/group from lxd, but on container it’s mysql
, which I guess is a user/group that has been created. Now I don’t think I can just make the service use root.