Closed
Description
Problem
This seems to be a generic problem in the MySQL and MariaDB images. If --socket is passed when the container is created then the database fails to initialize, for example
docker run -d -e MYSQL_ROOT_PASSWORD=foo mysql:5.6 --socket=/tmp/mysql.sock
The problem resides at round line 70 of docker-entrypoint.sh
mysql=( mysql --protocol=socket -uroot -hlocalhost)
This code will assume the default location of the socket file (e.g. /var/run/mysqld/mysqld.sock), and does not take into account the location specified in the command line.
Solution
Ensure that any value from the command line is reflected in all potential uses of the mysql command.
Metadata
Metadata
Assignees
Labels
No labels