---
title: "MySQL 8.0 to 5.7 backport database driver for upgrading to Drupal 11"
date: "2024-06-11T07:38:38+00:00"
summary: "Upgrade to Drupal 11 on MySQL 5.7 with our backport driver. Step-by-step guide for installation and configuration."
image:
type: "page"
url: "/acquia-cloud-platform/mysql-80-57-backport-database-driver-upgrading-drupal-11"
id: "3ccb0086-f455-443a-9c36-c253015a47da"
---

Table of contents will be added

Drupal 11 requires MySQL 8.0 or later. However, many of the Cloud Platform environments are still not upgraded to MySQL 8.0. 

On such environments, if you want to install a new Drupal 11 application or upgrade an existing application from Drupal 10 to Drupal 11, you can use the [MySQL 8.0 to 5.7 backport database driver](https://www.drupal.org/project/mysql57) module.

Enabling the MySQL 8.0 to 5.7 backport database driver module
-------------------------------------------------------------

Use this procedure to:

*   Enable the module in Drupal 11.
*   Enable the module in Drupal 10 to upgrade an existing application from Drupal 10 to Drupal 11.

### Prerequisites

Before enabling the module, ensure that you have:

*   Cloud Platform account
*   PHP 8.3 installed on your environment

### Installing the MySQL backport module

To install the MySQL 8.0 to 5.7 backport database driver module:

1.  Add the MySQL 8.0 to 5.7 backport database driver module by running the following command:
    
        composer require 'drupal/mysql57:^1.0'
    
2.  In the `settings.php` file, add the following line before the [Acquia require line](/acquia-cloud-platform/acquia-require-line "Acquia require line")  outside any `if` statements that conditionally load the settings on Acquia environments:
    
        require DRUPAL_ROOT . '/modules/contrib/mysql57/settings.inc';
        
        // Example Acquia Cloud Require Line
        if (file_exists('/var/www/site-php/application/application-settings.inc')) {
          require '/var/www/site-php/application/applcatopm-settings.inc';
        }
        
    
3.  In the administrative menu, click **Extend** and search for `MySQL 5.7`.
    
    ![The Extend screen of the Drupal interface is shown. The List tab is highlighted and the filter contains the value MySQL 5.7. In the list of modules, MySQL 5.7 is shown as installed.](https://acquia.widen.net/content/5d47394a-c3bf-4ef2-acb5-48a011c12d95/web/cloud-platform_drupal-installing-mysql-backport-module.png?w=941&itok=UwDxAggy)
    
4.  Select the **MySQL 5.7** checkbox and click **Install**.
5.  In the **Reports** section, navigate to **Status report**.
6.  Verify that the system does not report any error for the database system version.
    
    ![Drupal interface wis shown with the Report administrative menu item selected. The value of Database system version is set to 5.7.39.](https://acquia.widen.net/content/cdf2f4eb-112b-450e-bef5-31ae8b235bb3/web/cloud-platform_drupal-checking-database-system-version.png)
    

Uninstalling the MySQL 8.0 to 5.7 backport database driver module
-----------------------------------------------------------------

After your Cloud Platform environment is upgraded to MySQL 8, you can uninstall the MySQL Backport module with the following steps:

1.  From the `settings.php` file, remove  the following line:
    
        require DRUPAL_ROOT . '/modules/contrib/mysql57/settings.inc';
    
2.  In the administrative menu, click **Extend** and select  **Uninstall**.
    
    The system displays a list of modules that you can uninstall.
    
3.  Select the **MySQL 5.7** checkbox and click **Uninstall**.
4.  Remove the module from your codebase by running the following command:
    
        composer remove 'drupal/mysql57'
    

Posting questions or comments for the MySQL Backport module
-----------------------------------------------------------

To post module-related questions or comments for its maintainer or to report bugs or other issues, file an issue in the [issue queue](https://www.drupal.org/project/issues/mysql57).