Skip to content

Commit

Permalink
fix: local socket in mysql images
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Dec 10, 2024
1 parent ccf9d7e commit ad74f34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions images/mariadb/entrypoints/9999-mariadb-init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ EOF
fi

echo "done, now starting daemon"
touch /tmp/startup-init-complete
touch /tmp/mariadb-init-complete

fi
4 changes: 4 additions & 0 deletions images/mysql/entrypoints/9999-mysql-init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -147,6 +150,7 @@ EOF
fi

echo "done, now starting daemon"
touch /tmp/startup-init-complete
touch /tmp/mysql-init-complete

fi

0 comments on commit ad74f34

Please sign in to comment.