# MySQL init process failed. Docker on Ubuntu 16.04

**URL:** https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839
**Category:** Get Help
**Created:** [July 18, 2017, 3:13pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839 "2017-07-18T15:13:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Wolfe](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/andrew_wolfe/32/3498_2.png) [@Andrew\_Wolfe](https://community.xibo.org.uk/u/Andrew_Wolfe)
#### Post date: [July 18, 2017, 3:13pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/1 "2017-07-18T15:13:39Z")

</div>

I’m having a tough time getting Xibo running in Docker on Ubuntu 16.04. I’ve been following the guide here: [Xibo 1.8.0 with Docker on Ubuntu 16.04](https://community.xibo.org.uk/t/xibo-1-8-0-with-docker-on-ubuntu-16-04/9392)

Everything seems very straight forward but after starting `docker-compose up -d`, I can’t load the login page by navigating to the IP address of the server. (DigitalOcean brand new droplet just for this.)

When I run `docker-compose up` to see the output, I see `cms-db_1 | MySQL init process failed.` and it gets stuck in a loop trying to complete that step. If I let it run long enough, it will start the webserver anyway and loading the webpage will display:

`Fatal Error - sorry this shouldn't happen. SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql' (2)`

My `config.env` has an alphanumeric password set, and on each attempt I remove the shared folder completely before trying again.

Ideas?

---

<div class="post-metadata">

### Author: ![Peter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/peter/32/8154_2.png) [@Peter](https://community.xibo.org.uk/u/Peter)
#### Post date: [July 18, 2017, 3:24pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/2 "2017-07-18T15:24:28Z")

</div>

In this case when you run  
`docker ps -a`

I assume it will show -db\_1 as down

Could you run  
`docker-compose logs`  
and show us the output of that please?

If you open the config.env file does it has your correct mysql password?

---

<div class="post-metadata">

### Author: ![Andrew\_Wolfe](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/andrew_wolfe/32/3498_2.png) [@Andrew\_Wolfe](https://community.xibo.org.uk/u/Andrew_Wolfe)
#### Post date: [July 18, 2017, 3:36pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/3 "2017-07-18T15:36:14Z")

</div>

It shows -db\_1 as `Restarting (137) XX seconds ago`. Seems to stay in the loop.

Here’s a portion of the logs before the loop begins.

```
Attaching to xibo_cms-web_1, xibo_cms-xmr_1, xibo_cms-db_1
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-web_1 | MySQL started
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | New install
cms-web_1 | Provisioning Database
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | Configuring Database Settings
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | Setting up Maintenance
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1 | Updating settings.php
cms-web_1 | Configuring Backups
cms-web_1 | Configuring Maintenance
cms-web_1 | Setting up CMS alias
cms-web_1 | Running maintenance
cms-db_1 | Initializing database
cms-db_1 | 2017-07-18 15:03:23 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1 | 2017-07-18 15:03:23 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
cms-db_1 | 2017-07-18 15:03:23 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 32 ...
cms-web_1 | Starting cron
cms-web_1 | Starting webserver
cms-web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-db_1 | 
cms-db_1 | 
cms-db_1 | 2017-07-18 15:03:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1 | 2017-07-18 15:03:26 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
cms-db_1 | 2017-07-18 15:03:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 55 ...
cms-db_1 | 
cms-db_1 | 
cms-db_1 | 
cms-db_1 | 
cms-db_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
cms-db_1 | To do so, start the server, then issue the following commands:
cms-db_1 | 
cms-db_1 | /usr/bin/mysqladmin -u root password 'new-password'
cms-db_1 | /usr/bin/mysqladmin -u root -h fe23f9fc1df4 password 'new-password'
cms-db_1 | 
cms-db_1 | Alternatively you can run:
cms-db_1 | 
cms-db_1 | /usr/bin/mysql_secure_installation
cms-db_1 | 
cms-db_1 | which will also give you the option of removing the test
cms-db_1 | databases and anonymous user created by default. This is
cms-db_1 | strongly recommended for production servers.
cms-db_1 | 
cms-db_1 | See the manual for more instructions.
cms-db_1 | 
cms-db_1 | Please report any problems at http://bugs.mysql.com/
cms-db_1 | 
cms-db_1 | The latest information about MySQL is available on the web at
cms-db_1 | 
cms-db_1 | http://www.mysql.com
cms-db_1 | 
cms-db_1 | Support MySQL by buying support/licenses at http://shop.mysql.com
cms-db_1 | 
cms-db_1 | Note: new default config file not created.
cms-db_1 | Please make sure your config file is current
cms-db_1 | 
cms-db_1 | WARNING: Default config file /etc/mysql/my.cnf exists on the system
cms-db_1 | This file will be read by default by the MySQL server
cms-db_1 | If you do not want to use this, either remove it, or use the
cms-db_1 | --defaults-file argument to mysqld_safe when starting the server
cms-db_1 | 
cms-db_1 | Database initialized
cms-db_1 | MySQL init process in progress...
cms-db_1 | /usr/local/bin/docker-entrypoint.sh: line 100: 83 Killed "$@" --skip-networking --socket="${SOCKET}"
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process in progress...
cms-db_1 | MySQL init process failed.

```

Since this is a new installation I’ve been providing a new password that I generated.

---

<div class="post-metadata">

### Author: ![alex](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/alex/32/5782_2.png) [@alex](https://community.xibo.org.uk/u/alex)
#### Post date: [July 18, 2017, 6:02pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/4 "2017-07-18T18:02:28Z")

</div>

Very strange, that’s the second instance I’ve seen today restarting over and over. I wonder if there’s a bad MySQL container been pushed up to Docker Hub (we don’t maintain that).

I’ll have a try here and see if I can replicate it.

One thing, you say you’re removing the `shared/db` folder between attempts, but are you also destroying the containers? You need to as well - ie `docker-compose down` to get a clean slate, as well as removing `shared/db`

---

<div class="post-metadata">

### Author: ![alex](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/alex/32/5782_2.png) [@alex](https://community.xibo.org.uk/u/alex)
#### Post date: [July 18, 2017, 6:05pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/5 "2017-07-18T18:05:02Z")

</div>

> [@alex](#):
>
> I’ll have a try here and see if I can replicate it.

I trashed my containers, did a `docker-compose pull`, and the resulting setup worked, so I don’t think it’s a bad container.

If you want to PM me some SSH details, I’ll have a look for you and see if I can work out what the issue is.

---

<div class="post-metadata">

### Author: ![Andrew\_Wolfe](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/andrew_wolfe/32/3498_2.png) [@Andrew\_Wolfe](https://community.xibo.org.uk/u/Andrew_Wolfe)
#### Post date: [July 18, 2017, 6:23pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/6 "2017-07-18T18:23:14Z")

</div>

I wasn’t destroying the container before. I’ve tried again a few times with that as well, but it’s not helping. I can send login details, but I’m having trouble finding a link to do that on your profile.

---

<div class="post-metadata">

### Author: ![alex](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/alex/32/5782_2.png) [@alex](https://community.xibo.org.uk/u/alex)
#### Post date: [July 19, 2017, 6:58am UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/7 "2017-07-19T06:58:12Z")

</div>

Issue was insufficient RAM.

---

<div class="post-metadata">

### Author: ![Andrew\_Wolfe](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/andrew_wolfe/32/3498_2.png) [@Andrew\_Wolfe](https://community.xibo.org.uk/u/Andrew_Wolfe)
#### Post date: [July 19, 2017, 9:47pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/8 "2017-07-19T21:47:39Z")

</div>

Indeed it was. Upgraded to a 1GB droplet and added a swapfile. Things seem to be running good so far. Thanks for your personal help!

---

<div class="post-metadata">

### Author: ![system](https://community.xibo.org.uk/uploads/default/original/2X/a/a8759c2d8cc561474733895ac75beeb830f5d8ca.png) [@system](https://community.xibo.org.uk/u/system)
#### Post date: [March 4, 2020, 5:08pm UTC](https://community.xibo.org.uk/t/mysql-init-process-failed-docker-on-ubuntu-16-04/10839/9 "2020-03-04T17:08:14Z")

</div>


