The MySQL/MariaDB driver that's included in Drupal 11 core requires MySQL 8.0+ or MariaDB 10.6+.

This module lets you install and use Drupal 11 on MySQL 5.7.8+ and MariaDB 10.3.7+, which match Drupal 10's requirements. This makes it easier for people to upgrade from Drupal 10 to Drupal 11, even if you don't yet have access to the higher MySQL or MariaDB versions. If you do have access to the higher MySQL or MariaDB versions, it is recommended that you upgrade to that instead of using this module.

Instructions

1. Installation

composer require drupal/mysql57

2. Configuration

2.a Without a pre-existing settings.php file

If you are installing Drupal from scratch, without a pre-existing settings.php file, and allowing the installer to write the settings.php file for you, then just follow the installer's instructions, and it will write out settings.php with the information that's needed.

2.b With a pre-existing settings.php file

If you already have a settings.php file, then this driver's information needs to be defined in your database settings. Add the following to your settings.php file:

require DRUPAL_ROOT . '/modules/contrib/mysql57/settings.inc';
  • If your settings.php file defines the $databases variable, then add the above line after that definition.
  • If your settings.php file includes a require line that loads a hosting platform file that opens your database connection, then add the above line before that hosting platform require line.

3. Enable the module

Enable this module via /admin/modules.

Project information

Releases