docker-library / docker-library/mysql

Kubernetes CrashLoopBackOff where attempting to upgrade from mysql 5.7.x to 8.0.34

Open
#1,041 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2.6k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hi folks,

We've been running various flavours of mysql 5.7.x for a few years, and now one of the items we're hosting requires 8.0.34 (prior release was 5.7.39).

In attempting to upgrade the deployment, it seems that the /usr/local/bin/docker-entrypoint.sh runs once as root and then attempts to run as the user mysql.. this latter step fails.. and then we have no logging to advise why (despite passing --verbose to /usr/local/bin/docker-entrypoint.sh)..

The /usr/local/bin/docker-entrypoint.sh, is loaded within our images own entrypoint and per the below:

{
    {
        if [ -f /usr/local/bin/docker-entrypoint.sh ]
        then
            /bin/echo "Running /usr/local/bin/docker-entrypoint.sh..."
            /bin/bash -x /usr/local/bin/docker-entrypoint.sh mysqld --verbose 2>&1
        else
            /bin/echo "ERROR: Cannot find /usr/local/bin/docker-entrypoint.sh..."
        fi
    } | /usr/bin/tee -a "${debugFile}"
}

Prior to upgrading, we're gracefully shutting down mysql 5.7 via mysqladmin.

I'm just a little stumped as no real helpful logs to advise what the issue is, so help appreciated!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported startMySQL wrapper and /usr/local/bin/docker-entrypoint.sh invocation, including the switch from root to mysql and the --verbose output. Compare the MySQL 5.7 and 8.0.34 upgrade behavior in the Kubernetes deployment, then document a reproducible cause and the logs or diagnostics that explain the CrashLoopBackOff.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes, mysql, shell
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.