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.
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.
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)
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.
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.
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.
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.
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.