Host is not allowed to connect to this MySQL server

Hello,

We are upgrading our Xibo CMS installation from XAMPP to Docker (Running on Windows). I have got as far as running the container and accessing the web portal but we get the below error when accessing the web portal.
Fatal Error - sorry this shouldn't happen. SQLSTATE[HY000] [1130] Host '192.168.144.5' is not allowed to connect to this MySQL server

I have tried stopping the container and rebuilding it from scratch but no luck. I have also checked our MySQL password is alpha numeric with no symbols.

This is the command I am running to launch the container.
image
Since we have other services running on XAMPP I have changed the web port 85. I have also tried adding command: --innodb_use_native_aio=0 to cms_custom-ports.yml and config.env.
image
I’m not sure if this affects it but we are importing from our old CMS and so I have placed import.sql in our backup folder (Which it changes to .sql.done)
image
I am storing all the files in the C:\Xibo folder. I’m not sure if 192.168.144.5 is an internal IP docker uses but it is not one of our IPs (We use the 172.16.0.0 to 172.31.255.255 range). A correct IP in our IP range is set on the vEthernet HyperV Switch and within the Docker settings.

This is the output of the docker ps -a command:

The docker-compose log file can be found here: https://pastebin.com/raw/hMDX2FzQ

Any help would be appreciated! Thank you.

I would

docker-compose -f cms_custom-ports.yml down
docker-colmpose -f cms_custom-ports.yml up -d

That will create the MySQL container again, with the existing data.

Also just to double check, your import.sql file contains only the Xibo database you exported from your previous server? It mustn’t contain multiple databases (eg the mysql database itself) as that will cause the kinds of errors you’re seeing.

Thank you for your response :slight_smile: I tried the above two commands you mentioned but I get the same error unfortunately.

I followed the guide from this page (Upgrade and Switch to Docker Install | Xibo Digital Signage) which mentioned the following:

Export your database from your old installation by running the following, e.g. mysqldump -u user -p database-name > shared/backup/import.sql

This a snippet of my previous settings.php file

$dbhost = ‘localhost’;
$dbuser = ‘xibo’;
$dbpass = ‘oldPassword’; (We had to change this in the new Xibo CMS as it contained symbols)
$dbnane = ‘xibo’;

Just to be sure I ran the docker-compose -f cms_custom-ports.yml down command and recreated the shared directory. I then ran C:\xampp1\mysql\bin\mysqldump.exe -u xibo -p xibo > shared/backup/import.sql with the current working directory being my C:\Xibo folder. It asks for the password to which I enter the password from the settings.php file.

After confirming the file has been created in the folder I ran the docker-compose -f cms_custom-ports.yml up -d command but I get the same issue as before.

What’s the output from docker-compose -f cms_custom-ports.yml log cms-web and docker-compose -f cms_custom-ports.yml log cms-db ?

cms-web logs: https://pastebin.com/raw/Fm1L7V2Q
cms-db logs: https://pastebin.com/raw/zV7sKGG1

OK I don’t see anything strange there (other than the error you’ve already mentioned).

Can you try downing the containers, deleting shared/db and then upping again (without importing your old database).

Does it do anything differently then?

I tried downing the containers and then upping them again without importing the old database but the same issue occurs.

I realised I had both the XAMPP MySQL database and the Xibo one running at the same time but stopping the XAMPP one didn’t affect it.

There doesn’t seem to be a Xibo database under the xibo_cms-db_1 container, I’m not sure if that is a different issue or because of the above.
image

That doesn’t sound right then.

Xibo doesn’t create the database, MySQL does it for us as part of the startup process. It should make a database called cms.

Can you post your config.env and cms_custom-ports.yml files please - redacting any passwords, but not removing any lines etc.

I double checked my XAMPP MySQL instance to make sure it wasn’t creating the CMS database there (Even though it was turned off) and indeed it is only showing the databases I expect.
image

cms_custom-ports.yml - https://pastebin.com/raw/4iq886px
config.env - https://pastebin.com/raw/d7DwbHPn

I can’t explain that then. Everything looks good to me.

The MySQL container itself should create the database when it first starts up.

As a last resort, you could try downing containers, deleting shared/db again and then swapping to MySQL 5.7 instead of 5.6 in the cms-custom_ports.yml file, and then upping.

Downing the container, deleting the shared/db folder and then changing it for 5.7 instead of 5.6 didn’t unfortunately, same error as before.

I’m afraid I’m out of ideas in that case. I can’t explain why the MySQL container is misbehaving in your setup.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.