'Percona on podman with bind mount on /var/lib/mysql not working
I spent an entire day on this with no progress. Percona/MySQL documentation was read and followed, here is the result.
On RHEL/Alma
/srv/percona/my.cnf.d and /srv/percona/mysql are both empty, selinux turned off to debug this.
sudo podman run \
--name=percona-server \
--publish=3306:3306 \
--mount=type=bind,src=/srv/percona/my.cnf.d,dst=/etc/my.cnf.d \
--mount=type=bind,src=/srv/percona/mysql,dst=/var/lib/mysql \
percona:ps-8
No error messages, empty podman logs percona-server, container kills itself with exit code 1
sudo podman run \
--name=percona-server \
--publish=3306:3306 \
--mount=type=bind,src=/srv/percona/my.cnf.d,dst=/etc/my.cnf.d \
percona:ps-8
This command works, the problem must be the /var/lib/mysql directory.
I read that permissions must be set for the user inside the container. The container runs mysql user with 1001:1001 ID.
Doing a sudo chown -R mysql:mysql /srv/percona/mysql doesn't change anything.
I have another user on the host system with 1001:1001, if I change ownership with sudo chown -R 1001:1001 /srv/percona/mysql there is a collision.
What could the problem be?
What do I do to debug it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
