Skip to content

Question about Relation between the Deprecated Environment Variables and the Latest Ruby Version #812

@hayat01sh1da

Description

@hayat01sh1da

1. Preface

Hello, dear the Docker Community and the MySQL Team.
I would like to ask you 2 questions below.

  1. In which version have MYSQL_USER and MYSQL_PASSWORD gone deprecated at latest before mysql:8.0.27 ?
  2. Are the deprecated environment variables related to the latest Ruby version, 3.1.0 and have you ever got any reports about it so far?

To explain the details, I would be happy if you allowed me to share the context below.

2. What is going on

2-1. Error Raised after Update of Docker for Windows with mysql:8.0.17

After I updated Docker for Windows to 4.3.0 assigning mysql:8.0.17 in docker-compose.yml, I failed to boost the database process and exited with the error code 1 as follows.

$ docker-compose up database
[+] Running 1/0
 ⠿ Container urey-server_database_1  Created                                                                                                                                   0.0s
Attaching to database_1
database_1  | 2021-12-10T05:31:51.681303Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using
this option as it' is deprecated and will be removed in a future release.
database_1  | 2021-12-10T05:31:51.681351Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 1
database_1  | 2021-12-10T05:31:51.745665Z 1 [ERROR] [MY-012530] [InnoDB] Unknown redo log format (4). Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/ upgr
ading-downgrading.html.
database_1  | 2021-12-10T05:31:51.745682Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
database_1  | 2021-12-10T05:31:52.201696Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
database_1  | 2021-12-10T05:31:52.201894Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
database_1  | 2021-12-10T05:31:52.202039Z 0 [ERROR] [MY-010119] [Server] Aborting
database_1  | 2021-12-10T05:31:52.202480Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.17)  MySQL Community Server - GPL.
database_1 exited with code 1
$ docker logs -f database
database_1  | 2021-12-10T05:11:32.661474Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using
this option as it' is deprecated and will be removed in a future release.
database_1  | 2021-12-10T05:11:32.661537Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 1
database_1  | 2021-12-10T05:11:32.770441Z 1 [ERROR] [MY-012530] [InnoDB] Unknown redo log format (4). Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/ upgr
ading-downgrading.html.
database_1  | 2021-12-10T05:11:32.770486Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
database_1  | 2021-12-10T05:11:33.219177Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
database_1  | 2021-12-10T05:11:33.219355Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
database_1  | 2021-12-10T05:11:33.219448Z 0 [ERROR] [MY-010119] [Server] Aborting
database_1  | 2021-12-10T05:11:33.219883Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.17)  MySQL Community Server - GPL.
database_1  | 2021-12-10T05:11:41.689699Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using
this option as it' is deprecated and will be removed in a future release.
database_1  | 2021-12-10T05:11:41.689756Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 1
database_1  | 2021-12-10T05:11:41.754802Z 1 [ERROR] [MY-012530] [InnoDB] Unknown redo log format (4). Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/ upgr
ading-downgrading.html.
database_1  | 2021-12-10T05:11:41.754817Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
database_1  | 2021-12-10T05:11:42.211972Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
database_1  | 2021-12-10T05:11:42.212193Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
database_1  | 2021-12-10T05:11:42.212311Z 0 [ERROR] [MY-010119] [Server] Aborting
database_1  | 2021-12-10T05:11:42.212684Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.17)  MySQL Community Server - GPL.

Then, I assigned the latest MySQL image whose tag was 8.0.27 in docker-compose.yml, the error above was somehow resolved and stopped showing up.

2-2. Another Error Raised after Update of Ruby version with mysql:8.0.27

After I updated Ruby version from the current 3.0.2 to the latest 3.1.0 assigning mysql:8.0.27 in docker-compose.yml, I failed to boot the database process and exited with error code 1 as follows.

Starting urey-server_database_1 ... done
Attaching to urey-server_database_1
database_1       | 2022-01-13 10:09:56+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.27-1debian10 started.
database_1       | 2022-01-13 10:09:56+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
database_1       | 2022-01-13 10:09:56+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.27-1debian10 started.
database_1       | 2022-01-13 10:09:56+00:00 [ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used f
or the root user
database_1       |     Remove MYSQL_USER="root" and use one of the following to control the root user password:
database_1       |     - MYSQL_ROOT_PASSWORD
database_1       |     - MYSQL_ALLOW_EMPTY_PASSWORD
database_1       |     - MYSQL_RANDOM_ROOT_PASSWORD
urey-server_database_1 exited with code 1

It was likely the environment variable, MYSQL_USER, had been deprecated, so I read docker hub > mysql > How to use this image > Environment Variables > MYSQL_USER, MYSQL_PASSWORD in order to make sure whether or not it was right.
Now, I am sure the hypothesis was correct.

So, I removed the MYSQL_USER from docker-compose.yml and tried booting the database process again. Then I succeeded in it as follows.

database:
-   image: mysql:8.0.17
+   image: mysql:8.0.27
    command: |
      mysqld --default-authentication-plugin=mysql_native_password
    ports:
      - '3306:3306'
    environment:
-     MYSQL_USER: 'root'
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    volumes:
      - mysql-data:/var/lib/mysql
$ docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS         PORTS                                                      NAMES
aa713c0d0d26   mysql:8.0.27                   "docker-entrypoint.s…"   9 minutes ago    Up 7 minutes   0.0.0.0:3306->3306/tcp, 33060/tcp                          urey-server_
database_1
b9ee2f0e04a0   urey-server_app                "sh -c 'bundle insta…"   59 minutes ago   Up 7 minutes   0.0.0.0:3000->3000/tcp                                     urey-server_
app_1
d1132698f1ec   stilliard/pure-ftpd:hardened   "/bin/sh -c '/run.sh…"   59 minutes ago   Up 7 minutes   0.0.0.0:21->21/tcp, 0.0.0.0:30000-30009->30000-30009/tcp   urey-server_
ftp_1
1d6368a747f2   urey-server_elasticsearch      "/usr/local/bin/dock…"   59 minutes ago   Up 7 minutes   0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp             urey-server_
elasticsearch_1

Also, I was able to log in MySQL as the default root superuser.

$ docker-compose exec database mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.27 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

As a note, I did not observe the problem I described above with mysql:8.0.17, so it should be specific in mysql:8.0.27.

3. What I would like to ask

These phenomena left the 2 questions I asked first, which are:

  1. What version has turned MYSQL_USERandMYSQL_PASSWORD` to deprecated environment variables?
  2. Why this error was raised in updating Ruby version from 3.0.2 to 3.1.0 ?

Nothing would be happier than your answers to each question.
I sincerely appreciate your generosity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions