Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access denied for user 'root'@'localhost' installing Contao 4.12 #3751

Closed
tabcontao opened this issue Nov 30, 2021 · 3 comments · Fixed by #3754
Closed

Access denied for user 'root'@'localhost' installing Contao 4.12 #3751

tabcontao opened this issue Nov 30, 2021 · 3 comments · Fixed by #3754
Labels
Milestone

Comments

@tabcontao
Copy link

Affected version(s)

Contao 4.12

Description

Trying to install Contao 4.12.3 with Contao-Manager on vServer results in an error during composer install / contao-setup
PHP 7.4.25
MariaDB 10.5.12

Same error also using Hostingwerk All In, netcup Webhosting 8000.
Installing Contao 4.9 works on the same platforms.

See also: Corresponding thread in Contao Community Forum

...
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
contao/manager-plugin: Generating plugin class...
contao/manager-plugin: ...done generating plugin class
90 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php vendor/bin/contao-setup

In AbstractMySQLDriver.php line 128:
                                                                               
  An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for u  
  ser 'root'@'localhost'                                                       
                                                                               

In Exception.php line 18:
                                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  
                                                                    

In PDOConnection.php line 40:
                                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  
                                                                    

Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1

# Process terminated with exit code 1
# Result: General error

Stack trace:

$ /usr/bin/php7.4 vendor/bin/contao-setup -vvv

In AbstractMySQLDriver.php line 128:

  [Doctrine\DBAL\Exception\DriverException]
  An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for u
  ser 'root'@'localhost'


Exception trace:
  at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128
 Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:182
 Doctrine\DBAL\DBALException::wrapException() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169
 Doctrine\DBAL\DBALException::driverException() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:31
 Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:411
 Doctrine\DBAL\Connection->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1951
 Doctrine\DBAL\Connection->getWrappedConnection() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1289
 Doctrine\DBAL\Connection->executeQuery() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1118
 Doctrine\DBAL\Connection->fetchFirstColumn() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/TemplateLocator.php:75
 Contao\CoreBundle\Twig\Loader\TemplateLocator->findThemeDirectories() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/ContaoFilesystemLoaderWarmer.php:55
 Contao\CoreBundle\Twig\Loader\ContaoFilesystemLoaderWarmer->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:99
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:587
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php:323
 Contao\ManagerBundle\HttpKernel\ContaoKernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:789
 Symfony\Component\HttpKernel\Kernel->preBoot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:128
 Symfony\Component\HttpKernel\Kernel->boot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:168
 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:74
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/bin/contao-setup:44

In Exception.php line 18:

  [Doctrine\DBAL\Driver\PDO\Exception (1698)]
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'


Exception trace:
  at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
 Doctrine\DBAL\Driver\PDO\Exception::new() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44
 Doctrine\DBAL\Driver\PDOConnection->__construct() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:25
 Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:411
 Doctrine\DBAL\Connection->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1951
 Doctrine\DBAL\Connection->getWrappedConnection() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1289
 Doctrine\DBAL\Connection->executeQuery() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1118
 Doctrine\DBAL\Connection->fetchFirstColumn() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/TemplateLocator.php:75
 Contao\CoreBundle\Twig\Loader\TemplateLocator->findThemeDirectories() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/ContaoFilesystemLoaderWarmer.php:55
 Contao\CoreBundle\Twig\Loader\ContaoFilesystemLoaderWarmer->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:99
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:587
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php:323
 Contao\ManagerBundle\HttpKernel\ContaoKernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:789
 Symfony\Component\HttpKernel\Kernel->preBoot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:128
 Symfony\Component\HttpKernel\Kernel->boot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:168
 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:74
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/bin/contao-setup:44

In PDOConnection.php line 40:

  [PDOException (1698)]
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'


Exception trace:
  at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
 PDO->__construct() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
 Doctrine\DBAL\Driver\PDOConnection->__construct() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:25
 Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:411
 Doctrine\DBAL\Connection->connect() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1951
 Doctrine\DBAL\Connection->getWrappedConnection() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1289
 Doctrine\DBAL\Connection->executeQuery() at /home/users/tbantel/www/c412.bit-06.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1118
 Doctrine\DBAL\Connection->fetchFirstColumn() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/TemplateLocator.php:75
 Contao\CoreBundle\Twig\Loader\TemplateLocator->findThemeDirectories() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/core-bundle/src/Twig/Loader/ContaoFilesystemLoaderWarmer.php:55
 Contao\CoreBundle\Twig\Loader\ContaoFilesystemLoaderWarmer->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:99
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:587
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php:323
 Contao\ManagerBundle\HttpKernel\ContaoKernel->initializeContainer() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:789
 Symfony\Component\HttpKernel\Kernel->preBoot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/http-kernel/Kernel.php:128
 Symfony\Component\HttpKernel\Kernel->boot() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:168
 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/framework-bundle/Console/Application.php:74
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/users/tbantel/www/c412.bit-06.de/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /home/users/tbantel/www/c412.bit-06.de/vendor/contao/manager-bundle/bin/contao-setup:44
@fritzmg
Copy link
Contributor

fritzmg commented Nov 30, 2021

@m-vo looks like catching ConnectionException in TemplateLocator is not enough, depending on the used driver presumably.

@m-vo
Copy link
Member

m-vo commented Nov 30, 2021

These various dbal exceptions are a mess. 😐

Should we add this one or rather catch a more generic one?

@m-vo m-vo added the bug label Nov 30, 2021
@m-vo m-vo added this to the 4.12 milestone Nov 30, 2021
@fritzmg
Copy link
Contributor

fritzmg commented Nov 30, 2021

Well the ConnectionException inherits from DriverException, so DriverException is already the more generic one. I'd got with that.

@leofeyer leofeyer linked a pull request Dec 1, 2021 that will close this issue
@leofeyer leofeyer closed this as completed Dec 1, 2021
leofeyer added a commit that referenced this issue Dec 1, 2021
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #3751 
| Docs PR or issue | -

Commits
-------

9300e36 Handle all driver exceptions in the template locator
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants