From ad74f342abf173bc21b237e57dfc2b2715aaeae7 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Tue, 10 Dec 2024 13:59:08 +1100 Subject: [PATCH] fix: local socket in mysql images --- images/mariadb/entrypoints/9999-mariadb-init.bash | 1 + images/mysql/entrypoints/9999-mysql-init.bash | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/images/mariadb/entrypoints/9999-mariadb-init.bash b/images/mariadb/entrypoints/9999-mariadb-init.bash index 86b2f9250..48825dd9d 100755 --- a/images/mariadb/entrypoints/9999-mariadb-init.bash +++ b/images/mariadb/entrypoints/9999-mariadb-init.bash @@ -149,6 +149,7 @@ EOF fi echo "done, now starting daemon" + touch /tmp/startup-init-complete touch /tmp/mariadb-init-complete fi diff --git a/images/mysql/entrypoints/9999-mysql-init.bash b/images/mysql/entrypoints/9999-mysql-init.bash index e4b8b14e0..ba65d662f 100755 --- a/images/mysql/entrypoints/9999-mysql-init.bash +++ b/images/mysql/entrypoints/9999-mysql-init.bash @@ -126,8 +126,11 @@ EOF echo "[client]" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf echo "user=root" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf echo "password=${MYSQL_ROOT_PASSWORD}" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf + echo "socket=/run/mysqld/mysqld.sock" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf echo "[mysql]" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf echo "database=${MYSQL_DATABASE}" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf + echo "[mysqld]" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf + echo "socket=/run/mysqld/mysqld.sock" >> ${MYSQL_DATA_DIR:-/var/lib/mysql}/.my.cnf for f in /docker-entrypoint-initdb.d/*; do if [ -e "$f" ]; then @@ -147,6 +150,7 @@ EOF fi echo "done, now starting daemon" + touch /tmp/startup-init-complete touch /tmp/mysql-init-complete fi