containers
containers copied to clipboard
[bitnami/mysql] init mysql8 failed with customized volumn direcatory
Name and Version
bitnami/mysql
What architecture are you using?
amd64
What steps will reproduce the bug?
docker run -e ALLOW_EMPTY_PASSWORD=yes -v ./data:/bitnami/mysql/data bitnami/mysql:latest
What is the expected behavior?
init ok
What do you see instead?
docker run -e ALLOW_EMPTY_PASSWORD=yes -v ./data:/bitnami/mysql/data bitnami/mysql:latest
Unable to find image 'bitnami/mysql:latest' locally
latest: Pulling from bitnami/mysql
bdccd087d348: Pull complete
Digest: sha256:e5c723e6c79e933254916ad7c765d234b6676802fa67ccb666e0648c3a4ee5ee
Status: Downloaded newer image for bitnami/mysql:latest
mysql 06:10:23.64 INFO ==>
mysql 06:10:23.65 INFO ==> Welcome to the Bitnami mysql container
mysql 06:10:23.65 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
mysql 06:10:23.65 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
mysql 06:10:23.65 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
mysql 06:10:23.65 INFO ==>
mysql 06:10:23.66 INFO ==> ** Starting MySQL setup **
mysql 06:10:23.67 INFO ==> Validating settings in MYSQL_*/MARIADB_* env vars
mysql 06:10:23.67 WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
mysql 06:10:23.68 INFO ==> Initializing mysql database
mysql 06:10:23.69 INFO ==> Updating 'my.cnf' with custom configuration
mysql 06:10:23.69 INFO ==> Setting slow_query_log option
mysql 06:10:23.73 INFO ==> Setting long_query_time option
mysql 06:10:23.74 INFO ==> Installing database
2024-10-14T06:10:24.000975Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-10-14T06:10:24.014129Z 0 [System] [MY-013169] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.4.2) initializing of server in progress as process 44
2024-10-14T06:10:24.035085Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
2024-10-14T06:10:24.035156Z 0 [ERROR] [MY-013236] [Server] The designated data directory /bitnami/mysql/data/ is unusable. You can remove all files that the server added to it.
2024-10-14T06:10:24.035214Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-10-14T06:10:24.049119Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
Additional information
No response
Hi,
Could you check that the permissions of the mounted folder are open enough so a random UID can write to it?
Hi,
Could you check that the permissions of the mounted folder are open enough so a random UID can write to it?
i think not; any sugguestiong config for docker-compose.yaml ? cc @javsalgar
Hi,
Could you check that the permissions of the mounted folder are open enough so a random UID can write to it?
id $USER
uid=1000(echoface) gid=1000(echoface) groups=1000(echoface),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),135(lxd),136(sambashare),137(docker)
data dir owner: root/echoface all tested got the same error
ref cc @javsalgar
When you mount the volume inside the container, which permissions does it have? You can try putting as docker-compose command and then enter using docker exec, there you can freely check the permissions of the data folder and perform tests like creating a file
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.