Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Only the mysql2 package is supported for the MySQL client

Strapi 5 can only use the mysql2 package for MySQL databases, and the client value for it must be set to mysql.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?No
🤖 Is this breaking change automatically handled by a codemod?Yes

Breaking change description

In Strapi v4

The database configuration client option for MySQL databases accepts several values such as mysql and mysql2.

In Strapi 5

The database configuration client option for MySQL database only accepts mysql.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

  • Strapi 5 uses the mysql2 package for SQLite databases under the hood and rewrites the mysql option as mysql2 for Knex.
  • Additional information about database clients and configuration can be found in the database configuration documentation.
  • Please also consider that MySQL v8 is the minimum required version for Strapi 5 (see the related breaking change entry).

Manual procedure

No manual migration should be required as codemods from the upgrade tool will handle this change.