Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql:5.7 image failing to start #971

Closed
xetrics opened this issue May 8, 2023 · 9 comments
Closed

mysql:5.7 image failing to start #971

xetrics opened this issue May 8, 2023 · 9 comments

Comments

@xetrics
Copy link

xetrics commented May 8, 2023

Image 5.7 fails to start with the following barebones config:

~ docker run --name mysql2 -d \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=password \
--restart unless-stopped \
mysql:5.7

container continuously throws the same error:

2023-05-08 15:49:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
2023-05-08 15:49:59+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
	command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.yrWVPwwrdU

This does not occur on mysql:latest

@tianon
Copy link
Member

tianon commented May 9, 2023

I can't reproduce; possibly related to #967 ?

@josenbaugh
Copy link

I have this same issue since about April 28th. 5.7 container will not start but latest will.

@no-reply
Copy link

no-reply commented May 18, 2023

i'm able to reproduce exactly as described in the original report:

~> docker run --name mysql2 -p 3306:3306 \
                      -e MYSQL_ROOT_PASSWORD=password \
                      --restart unless-stopped \
                      mysql:5.7
Unable to find image 'mysql:5.7' locally
5.7: Pulling from library/mysql
e83e8f2e82cc: Pull complete
0f23deb01b84: Pull complete
f5bda3b184ea: Pull complete
ed17edbc6604: Pull complete
33a94a6acfa7: Pull complete
f153bd2953e4: Pull complete
ab532edfb813: Pull complete
c76bdfe4f3d0: Pull complete
8a7ffe2f2551: Pull complete
857ada4fbbcc: Pull complete
b7c508404c3c: Pull complete
Digest: sha256:f57eef421000aaf8332a91ab0b6c96b3c83ed2a981c29e6528b21ce10197cd16
Status: Downloaded newer image for mysql:5.7
2023-05-18 16:56:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
2023-05-18 16:57:01+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
	command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.jMbz2AXnzG
	
~ [1]> docker version
Client:
 Version:           23.0.3
 API version:       1.42
 Go version:        go1.20.2
 Git commit:        3e7cbfdee1
 Built:             Wed Apr  5 13:17:36 2023
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          23.0.3
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.20.2
  Git commit:       59118bff50
  Built:            Wed Apr  5 13:17:36 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.0
  GitCommit:        1fbd70374134b891f97ce19c70b6e50c7b9f4e0d.m
 runc:
  Version:          1.1.5
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

update: i'm working with a colleague who is not able to reproduce (that is, his image works as expected) using the exact same image SHA and command. our docker version output is also identical except for:

2d1
<  Cloud integration: v1.0.29
25c24
<   GitCommit:
---
>   GitCommit:

@yosifkit
Copy link
Member

I am unable to reproduce on WSL2 using Docker Desktop or on a regular Debian Bullseye machine.

A few possible avenues:

  1. Perhaps related to the env value? Are you are using a different/unique password (not just password)? related issues: Root password ending on '\J' causes a crash #571, strip newline from all passed variables #613, and Unable to Run with Apostrophe in Password #776.

    We currently don't escape any password characters since we didn't want to implement the equivalent of mysql_real_escape_string in bash and didn't want to burden the image with an install of a library/language just for this purpose.

  2. Any differences between docker info on your two machines? Feel free to post both of them here if you can.

  3. Are you out of space on the host or VM? Maybe a docker system prune would help and cautiously also add --volumes (this could delete volumes with important data, so use with care).

@ljj038
Copy link

ljj038 commented May 28, 2023

same as @xetrics
after temp server started, then fix the socket link.
but failed to conn with socket.

https://github.com/docker-library/mysql/blob/e4bdff20153e6a05364a8fe80356dcfd502445bd/5.7/docker-entrypoint.sh#LL415C15-L415C15

@thaJeztah
Copy link

@bibstha
Copy link

bibstha commented Jun 4, 2023

I can confirm the exact same issue with host linux (amd64).
mysql:5.7.36 but mysql:5.7.37 and later does not work.
Steps to reproduce

This does not work (actually is flaky with failures most of the time). Even if it starts, the user and db are not created. mysql -uuser -ppassword fails.

version: '3.3'

services:
  mysql:
    image: mysql:5.7.37
    environment:
      - MYSQL_DATABASE=my_db
      - MYSQL_USER=user
      - MYSQL_PASSWORD=password
      - MYSQL_ROOT_PASSWORD=password
    ports:
      - 3306:3306
    volumes:
      - ./mysql_volume:/var/lib/mysql

This works!

version: '3.3'

services:
  mysql:
    image: mysql:5.7.36
    environment:
      - MYSQL_DATABASE=my_db
      - MYSQL_USER=user
      - MYSQL_PASSWORD=password
      - MYSQL_ROOT_PASSWORD=password
    ports:
      - 3306:3306
    volumes:
      - ./mysql_volume:/var/lib/mysql

Error

@tianon
Copy link
Member

tianon commented Dec 18, 2023

Unfortunately, MySQL 5.7 is now EOL upstream 🙇 ❤️

https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-44.html

@MetalArend
Copy link

For future reference: check #873 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants