---
title: "Workaround for DB connection issue in upgrading to Drupal 9.4.x"
date: "2023-09-27T17:07:00+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/92626-workaround-db-connection-issue-upgrading-drupal-94x"
id: "7d5307b6-8d64-496e-b8c6-b3817a741ac8"
---

**Important note: This Issue has been fix on the Acquia Platform. Do not use this workaround.**  
When upgrading to Drupal 9.4.7 or later you may get the following error:  

    Cannot instantiate abstract class Drupal\Core\Database\Schema in
     Drupal\Core\Database\Connection->schema()

  
While we are working on a permanent fix on this issue, as a temporary workaround you could add the following line into your [**settings.php**](/node/93686) file:

    $class_loader->addPsr4('Drupal\\mysql\\', 'core/modules/mysql/src/');

  
Current code:

    // Acquia include settings.
    if (file_exists('/var/www/site-php')) {
      // Acquia require line
      require '/var/www/site-php/XXX/XXX-settings.inc';
    }

  
Update to:

    // Acquia include settings.
    if (file_exists('/var/www/site-php')) {
      // Workaround for database error
      $class_loader->addPsr4('Drupal\\mysql\\', 'core/modules/mysql/src/');
      // Acquia require line
      require '/var/www/site-php/XXX/XXX-settings.inc';
    }

  
Please note this workaround should be tested on lower environments (dev or stage) **before applying to a production** environment.