Support of MariaDB/MySQL cross-database connection from Perl db drivers

Updated

The MariaDB database is a fork of MySQL. Over time, these services developed independently and are no longer fully compatible. These differences also affect the Perl database drivers. Consequently, if you use the DBD::mysql driver in a Perl application to connect to a MariaDB database, or the DBD::MariaDB driver to connect to a MySQL database, operations can lead to unexpected results. For example, the driver can return incorrect data from read operations. To avoid such problems, use the Perl driver in your application that matches the database service.

Red Hat only supports the following scenarios:

  • The Perl DBD::MariaDB driver with a MariaDB database
  • The Perl DBD::mysql driver with a MySQL database

Upgrade from RHEL 8

In RHEL 8, the perl-DBD-MariaDB package was not available and Perl applications could only use perl-DBD-MySQL to connect to both MySQL and MariaDB databases. RHEL 9 provides perl-DBD-MariaDB but, after an upgrade, perl-DBD-MySQL could still be used because perl-DBD-MariaDB is not automatically installed during an upgrade. Red Hat strongly recommends against this combination in RHEL 9 and later versions.

Configuration issues

There is a risk, that Perl DBD drivers do not support all configuration options from the database it connects to (perl-DBD-MySQL in MariaDB and perl-DBD-MariaDB in MySQL).

This article is related to the This content is not included.Cross combinations of Perl DB driver and DB server ticket.

Category
Components
Article Type