Your software
My Mautic version is: 2.16.3
My PHP version is: 7.2
Your problem
My problem is:
I am trying to migrate a mautic from running its DB on local mysql to managed DB in digital ocean.
I have gone ahead and imported DB to the Managed DB, updated the local.php in config to reflect new host, port, username and password, however keep getting an error connection, and I notice that it is still using my old password when trying to authenticate.
From my instance I am able to access the managed DB from the command line with correct credentials.
These errors are showing in the log:
2020/09/17 10:28:31 [error] 7153#7153: *436 FastCGI sent in stderr: "PHP message: PDOException: SQLSTATE[HY000] [2002] Connection timed out in /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Stack trace:
#0 /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct(âmysql:host=privâŚâ, âMYUSERâ, âOLD_PASSWORDâ, Array)
#1 /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(44): Doctrine\DBAL\Driver\PDOConnection->__construct(âmysql:host=privâŚâ,âMYUSERâ, 'OLD_PASSWORD, Array)
#2 /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, âMYUSERâ, 'OLD_PASSWORD, Array)
#3 /var/www/mautic/app/AppKernel.php(125): Doctrine\DBAL\Connection->connect()
#4 /var/www/mautic/app/middlewares/CORSMiddleware.php(93): AppKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#5 /var/www/mautic/app/middlewares/CatchExceptionMiddleware.php(45): Mautic\Middleware\CORSMiddleware->haâŚ
PHP message: Database connection error (code #0) - in file /var/www/mautic/app/AppKernel.php - at line 128" while reading response header from upstream, client: MY.IP.ADDRESS, server: MY.HOST, request: âGET / HTTP/1.1â, upstream: âfastcgi://unix:/run/php/php7.2-fpm.sock:â, host: âMY.HOSTâ
Steps I have tried to fix the problem: