[lxc-users] LXD share /var/lib/mysql from host to container and map user/group
David Favor
david at davidfavor.com
Sat Jul 14 16:12:28 UTC 2018
Tony P wrote:
> 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?
This is doable + breaks the following.
1) Container data no longer secure.
2) You can no longer use any operations like move or copy.
Best explain what you're trying to accomplish by having data at host level
then running container level database instance.
Better to run both at one level, either both at machine level or both
at container level.
If you do this, likely you'll have ongoing problems, including... if you
ever accidentally install server level database instance, you'll likely
destroy your data beyond any recovery.
More information about the lxc-users
mailing list