Your software
My Mautic version is:2.16
My PHP version is:7.3
My Database type and version is:3.6.8 Mysql
My problem is: I am trying to complete a domain name change on a Mautic site… and having problems.
These errors are showing in the log: On screen: Database Connection Error (Code #0)
I have made sure exactly what is logged in the local.php is the same as the DB… matter of fact I changed the password twice… with no change.
During domain change when moving the DB over to the new site… is there any reason that the user and pass must remain the same or is it ok to change them as long as you make sure they are matched in the local.php and the DB.
Is there anything that can be done other than just quadruple check that the data base and local.php match…
Initially it complained of not being able to build the cache… and i found that was the cache url was not correct.
Steps I have tried to fix the problem: See above.Next Doctrine\DBAL\Exception\ConnectionException: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'myuser-mautic'@'localhost' (using password: YES) in /home/lrsdnet/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103 Stack trace: #0 /home/myuser/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(145): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException)) #1 /home/lmyuser/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(47): Doctrine\DBAL\DBALException::driverException(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException)) #2 /home/lmyuser/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'myuser-mautic', 'mypass@', Array) #3 /home/myuser/public_html/app/AppKernel.php(125): Doctrine\DBAL\Connection->connect() #4 /home/myuser/public_html/app/middlewares/CORSMiddleware.php(93): AppKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #5 /home/myuser/public_html/app/middlewares/CatchExceptionMiddleware.php(45): Mautic\Middleware\CORSMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #6 /home/myuser/public_html/app/middlewares/VersionCheckMiddleware.php(57): Mautic\Middleware\CatchExceptionMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #7 /home/myuser/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\Middleware\VersionCheckMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /home/myuser/public_html/vendor/stack/run/src/Stack/run.php(13): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #9 /home/myuser/public_html/index.php(37): Stack\run(Object(Stack\StackedHttpKernel)) #10 {main} [15-Mar-2021 23:16:24 UTC] Database connection error (code #0) - in file /home/myuser/public_html/app/AppKernel.php - at line 128