[lxc-users] LXD share /var/lib/mysql from host to container and map user/group

Tony P tonypeagleon at gmail.com
Tue Jul 10 17:41:12 UTC 2018


Hi Andrey, I appreciate the help, thank you.

> It is no different than any other bind mount.
> What's your actual problem?

Well basically, the host dir belongs to mysql:mysql user/group. When
its added to the container as a shared dir, the ownership changes to
nobody:nogroup. The mysql/mariadb daemon can not work with those
permissions, it needs to be mysql:mysql. So what I want to do is map
this correctly so the data-dir will continue to have mysql:mysql
ownership within the container too. Whats the best way to accomplish
this?


On Tue, Jul 10, 2018 at 10:20 AM, Andrey Repin <anrdaemon at yandex.ru> wrote:
> Greetings, Tony P!
>
>> Hi Andrey. Actually, I should have mentioned this first but I don't mean
>> "share" in the sense of sharing a data-dir with two database instances.
>> Rather, I mean "share" in the context of Host to Container. I will only be
>> running mysql in the container, not the host. So my objective is basically
>> to offer the container mysql a valid data-dir *from* the host. That's it. Is it doable?
>
> It is no different than any other bind mount.
> What's your actual problem?
>
>
> --
> With best regards,
> Andrey Repin
> Tuesday, July 10, 2018 17:19:40
>
> Sorry for my terrible english...
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list