MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
759 stars 438 forks source link

mariadb:10.6 does not work with VirtioFS on docker desktop for mac #480

Closed kwhat closed 1 year ago

kwhat commented 1 year ago

VirtioFS is now the default for docker on mac and it doesn't appear to work with the mariadb:10.6 container and I don't understand why.

mariadb    | 2022-12-19 16:46:55+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.11+maria~ubu2004 started.
mariadb    | find: ‘/var/lib/mysql/mysql.sock’: No such file or directory
mariadb    | chown: cannot access '/var/lib/mysql/mysql.sock': No such file or directory
mariadb exited with code 1
mariadb    | find: ‘/var/lib/mysql/mysql.sock’: No such file or directory
mariadb    | chown: cannot access '/var/lib/mysql/mysql.sock': No such file or directory
mariadb exited with code 1
mariadb    | find: ‘/var/lib/mysql/mysql.sock’: No such file or directory
mariadb    | chown: cannot access '/var/lib/mysql/mysql.sock': No such file or directory
mariadb exited with code 1
mariadb    | find: ‘/var/lib/mysql/mysql.sock’: No such file or directory
mariadb    | chown: cannot access '/var/lib/mysql/mysql.sock': No such file or directory
mariadb exited with code 1

The /var/lib/mysql folder is a shared volume and I am using the default mariadb config shipped with the container which should have set /run/mysqld/mysqld.sock for the socket location so I have no idea why docker-entrypoint.sh is using /var/lib/mysql/mysql.sock. I would try and debug this further but docker-entrypoint.sh is pretty convoluted and I can't even apt-get install vi in this container so, here we are.

kwhat commented 1 year ago

This is a non-isssue for most people. There was some legacy socket file not owned by mysql in the shared folder and it was hidden in Apples Finder app so I never saw it till I looked on the cli. I love Apple. 🤦

grooverdan commented 1 year ago

Tip on debugging entry-point:

podman run --rm --user mysql mariadb  bash -x -v docker-entrypoint.sh mariadbd

Glad you found it.