Can someone guide me on what to check first of all to resolve Mysql connection problem? Or what information should I also provide to make the situation more clear?
changed MYSQL_HOST to 172.17.0.1, didn’t help either. What am I missing?
Waiting for MySQL to start - max 300 seconds
Waiting for MySQL to start - max 300 seconds
MySQL started
Updating settings.php
New install
Provisioning Database
Phinx by CakePHP - https://phinx.org. 0.9.2
using config file .varwwwcmsphinx.php
using config parser php
using migration paths
/var/www/cms/db/migrations
warning no environment specified, defaulting to: production
using adapter mysql
using database database_name
Configuring Database Settings
Setting up Maintenance
Protected Maintenance
Importing ca-certs
Setting up Quickchart
Configuring Maintenance
Removing web/install/index.php from production container
Starting cron
Starting webserver
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
In MysqlAdapter.php line 115:
There was a problem connecting to the database: SQLSTATE[HY000] [2002] Oper
ation timed out
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
cp: can’t stat ‘/var/www/cms/ca-certs/.pem’: No such file or directory
cp: can’t stat '/var/www/cms/ca-certs/.crt’: No such file or directory
WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘172.17.0.1’ (115)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
or if localhost used, I get such an error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
So we officially support launching the containers with docker-compose - which is why you’re having issues relating the documentation to what you’re doing.
I’m not a Plesk user, so can’t advise on that, but the issue is that the Xibo CMS container can’t connect to the MySQL database with the IP and credentials you’ve given it.
You need to enter the correct credentials and IP for the container to connect.
I suspect Plesk runs its MySQL bound to only the loopback interface, in which case you’ll need to reconfigure it so that it’s accessible on a second interface the container can access - but be very careful because you need to ensure that you don’t then expose MySQL to the internet. You’ll need to ensure you firewall that off.