# Percona Docker Fails - MySQL init process failed

**URL:** <https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556>\
**Category:** Uncategorized\
**Created:** [April 21, 2023, 1:38pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556 "2023-04-21T13:38:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterpond](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@waterpond](https://forums.percona.com/u/waterpond)\
**Post date:** [April 21, 2023, 1:38pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/1 "2023-04-21T13:38:27Z")

</div>

I’m trying to install the docker version of Percona and it fails with “MySQL init process failed.” after it starts the “MySQL init process in progress…”

Some article says its due to fewer resources and it needs min of 1GB RAM. My VM has 5GB of RAM and utilization is \<3%.

Appreciate any guidance..

# Here is the section from my docker-compose

# mysql: image: percona:ps-8.0 ports: - 36000:3306 volumes: - ./.docker/data/mysql:/var/lib/mysql - ./.docker/mysql-home:/home/mysql environment: - MYSQL\_DATABASE=dbname - MYSQL\_USER=dbuser - MYSQL\_PASSWORD=password - MYSQL\_ROOT\_PASSWORD=rootpassword - TZ=Asia/Kolkata command: - mysqld - --group-concat-max-len=1048576 - --character-set-server=utf8mb4 - --userstat=on - --sql-mode=STRICT\_TRANS\_TABLES,NO\_ZERO\_IN\_DATE,NO\_ZERO\_DATE,ERROR\_FOR\_DIVISION\_BY\_ZERO,NO\_ENGINE\_SUBSTITUTION - --default-authentication-plugin=mysql\_native\_password

# Here is the docker Logs

debian@debian11:$ docker-compose up mysql

Creating mysql\_1 … done

Attaching to mysql\_1

mysql\_1 | Initializing database

mysql\_1 | 2023-04-21T13:24:43.407676Z 0 [Warning] [MY-011068] [Server] The syntax ‘–skip-host-cache’ is deprecated and will be removed in a future release. Please use SET GLOBAL host\_cache\_size=0 instead.

mysql\_1 | 2023-04-21T13:24:43.407729Z 0 [Warning] [MY-010918] [Server] ‘default\_authentication\_plugin’ is deprecated and will be removed in a future release. Please use authentication\_policy instead.

mysql\_1 | 2023-04-21T13:24:43.407740Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) initializing of server in progress as process 16

mysql\_1 | 2023-04-21T13:24:43.415279Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

mysql\_1 | 2023-04-21T13:24:43.853754Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

mysql\_1 | 2023-04-21T13:24:45.422486Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

mysql\_1 | Database initialized

mysql\_1 | MySQL init process in progress…

mysql\_1 | 2023-04-21T13:24:48.378138Z 0 [Warning] [MY-011068] [Server] The syntax ‘–skip-host-cache’ is deprecated and will be removed in a future release. Please use SET GLOBAL host\_cache\_size=0 instead.

mysql\_1 | 2023-04-21T13:24:48.378990Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

mysql\_1 | 2023-04-21T13:24:48.379036Z 0 [Warning] [MY-010918] [Server] ‘default\_authentication\_plugin’ is deprecated and will be removed in a future release. Please use authentication\_policy instead.

mysql\_1 | 2023-04-21T13:24:48.379053Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) starting as process 62

mysql\_1 | 2023-04-21T13:24:48.389400Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

mysql\_1 | 2023-04-21T13:24:48.502450Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

mysql\_1 | 2023-04-21T13:24:48.651543Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

mysql\_1 | 2023-04-21T13:24:48.652030Z 0 [System] [MY-013602] [Server] Channel mysql\_main configured to support TLS. Encrypted connections are now supported for this channel.

mysql\_1 | 2023-04-21T13:24:48.668006Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/lib/mysql/mysqlx.sock

mysql\_1 | 2023-04-21T13:24:48.668452Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: ‘8.0.32-24’ socket: ‘/var/lib/mysql/mysql.sock’ port: 0 Percona Server (GPL), Release 24, Revision e5c6e9d2.

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process n progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…  
mysql\_1 | MySQL init process in progress…

mysql\_1 | MySQL init process failed.

mysql\_1 exited with code 1

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 21, 2023, 10:04pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/2 "2023-04-21T22:04:50Z")

</div>

> [@waterpond](#):
>
> mysql\_1 | 2023-04-21T13:24:48.668452Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections.

In the logs, it appears that MySQL is fully functional at this point. Can you try running the container using normal docker and not composer?

---

<div class="post-metadata">

**Author:** ![waterpond](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@waterpond](https://forums.percona.com/u/waterpond)\
**Post date:** [April 22, 2023, 2:35am UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/3 "2023-04-22T02:35:15Z")

</div>

Thanks for response.  
Yes, I started the failed docker container and connect to it and tried connecting to the db, but its not allowing even root user to connect.  
Logs

debian@debian11:~$ docker exec -it mysql\_1 bash  
bash-5.1$ mysql -u root

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

bash-5.1$

> Can you try running the container using normal docker and not composer?

How to do this ? I thought i was using the normal docker . I’m not aware of composer. Can you help me here pls.

BTW- I have tried installing this docker image on 3 different VMs and all fail in the same place.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 23, 2023, 12:18am UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/4 "2023-04-23T00:18:26Z")

</div>

> [@waterpond](#):
>
> Here is the section from my docker-compose

You are using composer. That’s not “normal” docker. Can you please provide the entire, normal, docker command to launch the database?

---

<div class="post-metadata">

**Author:** ![waterpond](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@waterpond](https://forums.percona.com/u/waterpond)\
**Post date:** [April 23, 2023, 3:00pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/5 "2023-04-23T15:00:57Z")

</div>

Oh Ok you meant Docker - Composer . Got it.

As suggested, I tried the below command line Docker Run and it still ended with the same error.

`sudo docker run --name mysql_1 -v /home/debian/workspace/.docker/data/mysql:/var/lib/mysql -v /home/debian/workspace/.docker/mysql-home:/home/mysql -e MYSQL_DATABASE=database -e MYSQL_USER=dbuser -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=rootpass -d percona:ps-8.0`

Question: How do I give the parameters under the COMMAND: tag in docker-compose via Docker Run ?

```auto
command: 
      - mysqld
      - --group-concat-max-len=1048576
      - --character-set-server=utf8mb4
      - --userstat=on
      - --sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
      - --default-authentication-plugin=mysql_native_password

```

Here is the log of the docker Run

```auto
Initializing database

2023-04-23T14:48:15.429673Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-04-23T14:48:15.431172Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) initializing of server in progress as process 13

2023-04-23T14:48:15.443572Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-04-23T14:48:15.807095Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-04-23T14:48:17.295050Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

Database initialized

MySQL init process in progress...

2023-04-23T14:48:20.499644Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-04-23T14:48:20.501557Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

2023-04-23T14:48:20.501617Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) starting as process 59

2023-04-23T14:48:20.511791Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-04-23T14:48:20.927732Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-04-23T14:48:21.113735Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2023-04-23T14:48:21.113780Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2023-04-23T14:48:21.144989Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/lib/mysql/mysqlx.sock

2023-04-23T14:48:21.145221Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32-24' socket: '/var/lib/mysql/mysql.sock' port: 0 Percona Server (GPL), Release 24, Revision e5c6e9d2.

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...
....
......
........ and more times.. 

MySQL init process in progress..

MySQL init process in progress...

MySQL init process failed.

```

---

<div class="post-metadata">

**Author:** ![waterpond](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@waterpond](https://forums.percona.com/u/waterpond)\
**Post date:** [April 23, 2023, 3:08pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/6 "2023-04-23T15:08:09Z")

</div>

Oh ok, you meant docker-composer . Got It.

As suggested, I ran the command directly via Docker Run and still the exact same issue/error.

`sudo docker run --name mysql_1 -v /home/debian/workspace/.docker/data/mysql:/var/lib/mysql -v /home/debian/workspace/.docker/mysql-home:/home/mysql -e MYSQL_DATABASE=database -e MYSQL_USER=dbuser -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=rootpass -d percona:ps-8.0`

Question - How do I convert the parameters under the Command: tag in docker-compose to docker run ?

```auto
command: 
      - mysqld
      - --group-concat-max-len=1048576
      - --character-set-server=utf8mb4
      - --userstat=on
      - --sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
      - --default-authentication-plugin=mysql_native_password

```

Here is the docker run logs.

```auto
Initializing database

2023-04-23T14:48:15.429673Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-04-23T14:48:15.431172Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) initializing of server in progress as process 13

2023-04-23T14:48:15.443572Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-04-23T14:48:15.807095Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-04-23T14:48:17.295050Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

Database initialized

MySQL init process in progress...

2023-04-23T14:48:20.499644Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-04-23T14:48:20.501557Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

2023-04-23T14:48:20.501617Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-24) starting as process 59

2023-04-23T14:48:20.511791Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-04-23T14:48:20.927732Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-04-23T14:48:21.113735Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2023-04-23T14:48:21.113780Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2023-04-23T14:48:21.144989Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/lib/mysql/mysqlx.sock

2023-04-23T14:48:21.145221Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32-24' socket: '/var/lib/mysql/mysql.sock' port: 0 Percona Server (GPL), Release 24, Revision e5c6e9d2.

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

..
....
...... <this init ran for around 1-2 time and printed the same message>

MySQL init process in progress...

MySQL init process in progress...

MySQL init process in progress...

MySQL init process failed.

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 24, 2023, 2:26pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/7 "2023-04-24T14:26:41Z")

</div>

I had no issues running your command:

```auto
$ docker run --name mysql_1 -e MYSQL_DATABASE=database -e MYSQL_USER=dbuser -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=rootpass -d percona:ps-8.0
Unable to find image 'percona:ps-8.0' locally
ps-8.0: Pulling from library/percona
649c80890636: Pull complete
44f2ae244073: Pull complete
5170f341d55c: Pull complete
c3fd55d47550: Pull complete
cf5d3fe07310: Pull complete
cc53e1746d61: Pull complete
Digest: sha256:f7f4e0ef666b51778edfc0ffe9dd05a69394430d05cd204d895056107b2610fe
Status: Downloaded newer image for percona:ps-8.0
ac9dfd2bc70dd69ddca38fcfa198051c5b4373eb0012ed7bca2f2b7da4d2e45d

$ docker exec -it mysql_1 mysql -udbuser -p database
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.32-24 Percona Server (GPL), Release 24, Revision e5c6e9d2

Copyright (c) 2009-2023 Percona LLC and/or its affiliates
Copyright (c) 2000, 2023, 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> select @@hostname;
+--------------+
| @@hostname |
+--------------+
| ac9dfd2bc70d |
+--------------+
1 row in set (0.00 sec)

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 24, 2023, 2:29pm UTC](https://forums.percona.com/t/percona-docker-fails-mysql-init-process-failed/21556/8 "2023-04-24T14:29:50Z")

</div>

Try removing the volume mounts from your docker commands. If it works that way (like mine) then you have permissions issues between host and docker that you will need to resolve.

Also, using ‘sudo’ with docker is a security issue. Please add your regular OS user to the docker group: [Linux post-installation steps for Docker Engine | Docker Documentation](https://docs.docker.com/engine/install/linux-postinstall/)
