MIDAS Knowledge Base MIDAS Knowledge Base

How to fix "DBD::mysql required MySQL 8.x or newer for building" errors

The self-hosted edition of our MIDAS room booking software has a number of server requirements.

MIDAS requires both Perl and a database (either MySQL or MariaDB).

Communication between Perl and the backend database is via a Perl Module - either DBD::mysql or DBD::MariaDB.

Either of these two modules must be present within your Perl installation in order to be able to install and use MIDAS.

Whilst your Perl installation may already come with one or both of these modules installed, if they are not present, then it's relatively forward to install additional Perl modules.

However, when installing DBD::mysql you may encouter the following error:

DBD::MySQL required MySQL 8.x or newer for building. Version reported by mysql_config --version: 5.7.16


What causes "DBD::MySQL required MySQL 8.x or newer for building" errors?

This errors can be encounted when attempting to install v5.x of the DBD::mysql module.

Version 5 of the DBD::mysql module only supports MySQL 8.x. Now, Perl supports MySQL 8 just fine, however, when attempting to install this module on some versions of Perl, Perl incorrectly reports that MySQL 5.7.16 is installed. It does this regardless of what version (if any) of a MySQL server is installed.

Because Perl incorrectly reports MySQL 5.7.16 is installed, DBD::mysql v5.x won't install (as MySQL 5.7 is no longer supported by version 5 of this module)


How to resolve "DBD::MySQL required MySQL 8.x or newer for building" errors

The good news is DBD::mysql can be installed by simply installing v4.05 of this module.

To install this version of the module, run the following:

cpan> D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz

The DBD::mysql module should then successfully install!


You might also be interested in...


MIDAS » KB » Support » Article 00257

← Return to the Knowledge Base