I tried to update from Drupal 9.3.14 to Drupal 9.4.1.

Everything went well in our test environment.

I put the production site in maintenance mode, updated all the files for the update, successfully ran the database updates using drush, followed by cache:rebuild.

Went back to the website, refreshed it and got a white page ... checked the error log and saw this :

[13-Jul-2022 14:30:50 America/New_York] Error: Class 'Drupal\mysql\Driver\Database\mysql\Connection' not found in C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\Database\Database.php on line 411 #0 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\Database\Database.php(189): Drupal\Core\Database\Database::openConnection() #1 [internal function]: Drupal\Core\Database\Database::getConnection() #2 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(79): call_user_func_array() #3 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Component\DependencyInjection\Container.php(176): Drupal\Component\DependencyInjection\PhpArrayContainer->createService() #4 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(212): Drupal\Component\DependencyInjection\Container->get() #5 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(62): Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters() #6 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Component\DependencyInjection\Container.php(176): Drupal\Component\DependencyInjection\PhpArrayContainer->createService() #7 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\DrupalKernel.php(550): Drupal\Component\DependencyInjection\Container->get() #8 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\DrupalKernel.php(895): Drupal\Core\DrupalKernel->getCachedContainerDefinition() #9 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\DrupalKernel.php(472): Drupal\Core\DrupalKernel->initializeContainer() #10 C:\inetpub\wwwroot\enharmonie_d9\web\core\lib\Drupal\Core\DrupalKernel.php(708): Drupal\Core\DrupalKernel->boot() #11 C:\inetpub\wwwroot\enharmonie_d9\web\index.php(19): Drupal\Core\DrupalKernel->handle() #12 {main}

I tried restarting the web server, the database, flushing the cache again ... nothing worked ... had to go back to the snapshot we took before I tried to run the update.

Any idea how to get rid of this error mesage? Thanks!

  • 1
    This is drupal.org/project/drupal/issues/3285724 or one of its related issues. Definitely go with 9.4.2 instead of 9.4.1 and use the workaround if necessary.
    – cilefen
    Jul 18, 2022 at 22:13
  • In the end, I decided to stick with the 9.3 branch for the moment since it's supported until December I think. Thanks for your help @cilefen .
    – agodin
    Aug 2, 2022 at 21:04

1 Answer 1


We just tracked this on our Jenkins to the need to have the $app_root variable defined to the correct path in the settings.php file. This was due to that variable being added for the autoload of the driver. In my case, for Jenkins, it was different my other environments and that path wasn't account for and resulted in that exact error.

Here is the Drupal commit that made this change. Thanks to my friend John Doyle at Digital Polygon for helping me track this issue down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.