Skip to content

Commit 2e67290

Browse files
authored
Merge pull request #239 from mysql/master
Hardcode socket path for temporary init runs of server and client
2 parents 9584428 + 12371a0 commit 2e67290

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

5.5/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
6464
mysql_install_db --datadir="$DATADIR" --rpm --basedir=/usr/local/mysql
6565
echo 'Database initialized'
6666

67-
"$@" --skip-networking --basedir=/usr/local/mysql &
67+
"$@" --skip-networking --basedir=/usr/local/mysql --socket=/var/run/mysqld/mysqld.sock &
6868
pid="$!"
6969

70-
mysql=( mysql --protocol=socket -uroot -hlocalhost)
70+
mysql=( mysql --protocol=socket -uroot -hlocalhost --socket=/var/run/mysqld/mysqld.sock)
7171

7272
for i in {30..0}; do
7373
if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then

5.6/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
6464
mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf
6565
echo 'Database initialized'
6666

67-
"$@" --skip-networking &
67+
"$@" --skip-networking --socket=/var/run/mysqld/mysqld.sock &
6868
pid="$!"
6969

70-
mysql=( mysql --protocol=socket -uroot -hlocalhost)
70+
mysql=( mysql --protocol=socket -uroot -hlocalhost --socket=/var/run/mysqld/mysqld.sock)
7171

7272
for i in {30..0}; do
7373
if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then

5.7/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
6464
"$@" --initialize-insecure
6565
echo 'Database initialized'
6666

67-
"$@" --skip-networking &
67+
"$@" --skip-networking --socket=/var/run/mysqld/mysqld.sock &
6868
pid="$!"
6969

70-
mysql=( mysql --protocol=socket -uroot -hlocalhost)
70+
mysql=( mysql --protocol=socket -uroot -hlocalhost --socket=/var/run/mysqld/mysqld.sock)
7171

7272
for i in {30..0}; do
7373
if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then

8.0/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
6464
"$@" --initialize-insecure
6565
echo 'Database initialized'
6666

67-
"$@" --skip-networking &
67+
"$@" --skip-networking --socket=/var/run/mysqld/mysqld.sock &
6868
pid="$!"
6969

70-
mysql=( mysql --protocol=socket -uroot -hlocalhost)
70+
mysql=( mysql --protocol=socket -uroot -hlocalhost --socket=/var/run/mysqld/mysqld.sock)
7171

7272
for i in {30..0}; do
7373
if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then

0 commit comments

Comments
 (0)