Host '172.18.0.4' is not allowed to connect to this MySQL server

I tried to install Xibo 1.8.2 in a Docker on Linux 17.04.

After navigating to localhost, I get the error: Fatal Error - sorry this shouldn’t happen. SQLSTATE[HY000] [1130] Host ‘172.18.0.4’ is not allowed to connect to this MySQL server.

What should I do?

Is this a fresh installation? Or something else?

Is MySQL in Docker too, or are you using an external MySQL server?

This is a fresh installation and I use MySQL in Docker.

That’s very strange then. You definitely set a password in the config.env file for MySQL? And that password was alpha-numeric only (ie A-Z a-z 0-9 only). Please be sure that’s the case first.

Then I’d recreate the containers I think. Presuming it’s never worked, and therefore you have no content in there to loose, you’d be safe to do the following:

docker-compose down
sudo rm -r shared
docker-compose up -d

That will down the containers, delete all their data (including any user data), and then create the whole lot fresh.

It’s not work.
I followed the example video : https://www.youtube.com/watch?v=e4lZQmP3QLw&t=465s&list=WL&index=22

You need to answer my questions if you want me to help you. I can’t help without your input.

Is the password you put in config.env, alpha numeric (ie only made from A-Z, a-z or 0-9) and has no special characters or spaces, per the instructions in the file?

What output do you get from:

docker-compose logs

The logs:
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-db_1 | 2017-09-04 12:39:13 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-09-04 12:39:13 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:16 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-09-04 12:39:16 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:19 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-09-04 12:39:19 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:21 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-09-04 12:39:21 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39: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-09-04 12:39:23 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39: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-09-04 12:39:26 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:30 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-09-04 12:39:30 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:37 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-09-04 12:39:37 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:39:51 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-09-04 12:39:51 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …
cms-db_1 | 2017-09-04 12:40:18 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-09-04 12:40:18 0 [Note] mysqld (mysqld 5.6.37) starting as process 1 …

docker-compose ps :
Name Command State Ports

xibo_cms-db_1 docker-entrypoint.sh mysqld Restarting
xibo_cms-web_1 /entrypoint.sh Up 0.0.0.0:80->80/tcp
xibo_cms-xmr_1 /entrypoint.sh Up 50001/tcp, 0.0.0.0:9505->9505/tcp

You still haven’t answered my question regarding the composition of your password in config.env

You don’t need to tell me what the password is, but just whether it complies with the specification or not. I’d guess from the output you’ve given in those logs it doesn’t, or it’s been left empty.

You need to set that to a suitable value (use the password generator linked in that file ideally to get a suitable password to use), and then do a full reset as I showed you earlier (ie down the containers, delete shared/db, and then bring them up again).