Circle ci image 5.7 ram version build failed

Hello, friends~ I’m John Liu.
Recently, our circle ci job build failed because our circleci/mysql:5.7-ram image build failed.
The error message is:


And then, when I modify to use circleci/mysql:5.7.32-ram, the error has just been fixed.
Does anyone know the root cause?

1 Like

Just happened.
We have written MYSQL_ROOT_PASSWORD in CircleCI settings yaml file. (./circleci/config.yml)

version: 2.1

orbs:
  rails: medpeer/rails@1.2.0
  slack: circleci/slack@3.4.2
  gcp-gcr: circleci/gcp-gcr@0.13.0

executors:
  app:
    docker:
      - image: circleci/ruby:2.7.2-node-browsers
      - image: circleci/mysql:5.7
    environment:
      RAILS_ENV: test
      MYSQL_ROOT_PASSWORD: ''
      MYSQL_ALLOW_EMPTY_PASSWORD: true
....

Apparently, this issue is discussing in here root user can't create new database? · Issue #750 · docker-library/mysql · GitHub

We’re also seeing this behavior with:

  node-mysql:
    docker:
      - image: circleci/node:14-browsers
        auth: *docker-pull-creds
      - image: circleci/mysql:5.7
        auth: *docker-pull-creds
        environment:
          MYSQL_DATABASE: circle_test
          MYSQL_ROOT_PASSWORD: test

Pinning the image version to circleci/mysql:5.7.32 fixed it for now: ci: pin mysql image version to work around broken update by m90 · Pull Request #576 · offen/offen · GitHub

Same here, downgraded to circleci/mysql:5.7.32-ram but now there is one out of 15 parallel builds that consistently fail with

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")

Hi @nick66551 welcome to the CircleCI Community! There was a breaking change with an upstream MySQL release (Error early if MYSQL_USER=root to prevent partially initialized databases by yosifkit · Pull Request #749 · docker-library/mysql · GitHub) that our team pushed last evening. However, we have re-released the image. Can you try to push a fresh commit and let us know if you are still experiencing issues?

Additionally, you can follow the steps in this support article to pin a docker image to a specific version and using the image sha from a previously passing build.

Let us know, looking forward to hearing from you!