Closed mayask closed 7 years ago
Setting chmod -R 777 /var/lib/mysql
on host does solve the problem.
Going back to chmod -R 775 /var/lib/mysql
on host bring up the issue again.
Hi Maxim, unfortunately I have no experience with Kubernetes so I don't know if the problem is specific to Kubernetes or not but I have not had that problem on Docker Swarm or Kontena although I have been using named volumes so that might be the difference. The mysqld.sh script is run as "mysql" user using gosu, so try adding a chown to start.sh while the user is still root. I think chown is appropriate rather than chmod 777 for security reasons.
Thanks for the answer! Will try and get back to you
The question is not specific to Kubernetes, since Docker is still backing it up.
I added a "chown" in the start.sh script to make sure the directory is owned by mysql. I don't know if this will fix your issue or not but I don't know what else would. Thanks!
Hi
I'm trying to run a galera-cluster on Kubernetes. It works pretty ok, by the way ;)
When using official
mariadb
image, container successfully initializes/var/lib/mysql
directory mounted from host machine with the following (default) permissions:However, when using galera cluster setup from this image, it fails to initialize mysql_data dir due to permission errors, even though volume setup/host permissions didn't change.
Could you please give me a hint on what could I do in this case?
This happens here https://github.com/colinmollenhour/mariadb-galera-swarm/blob/master/mysqld.sh#L13