Fixing MYSQL_OPT_RECONNECT warning by choosing the right Perl DB driver (DBD::MariaDB vs DBD::mysql)

Look I am really going to have to put my foot down here and veto this. Please undo this change, and if needed put the cpan module in the core distribution! Duplicated code is always a bad idea, because it means we have to maintain the same logic in two places.

Alright, no problem. Reverted back!

And, we’ll just recommend DBD::MariaDB the same way we recommend DBD::mysql. It’s really the simplest way.

Oh yeah, recommending DBD::MariaDB is 100% the correct thing to do.

Although won’t we also have to update mysql-lib.pl to use it?

1 Like

I think we should, because there are slight differences and it seems to be recommended to use the right driver depending on the database variant.

It shouldn’t be too hard to support, right?

1 Like

Yes, see Check for and use DBD::MariaBB as well · webmin/webmin@86a27ef · GitHub

Alright, and here are the final fixes to properly support MariaDB:

1 Like

This discussion directly resolves the issue I reported in my thread:
Webmin MariaDB Module Still Requires DBD::mysql Even When DBD::MariaDB Is Installed (Rocky Linux 9.7 + MariaDB 10.11)

The latest fixes (“Add ability to use correct driver depending on the database”) correctly detect and prefer DBD::MariaDB on MariaDB systems and eliminate the need for DBD::mysql or CPAN installs when native packages are available.

This fully addresses the problem I was seeing on Rocky Linux 9.7 with MariaDB 10.11.

Thanks a lot to @Ilia, @Jamie, @Joe and the rest of the team for the quick and clean fix — much appreciated.

1 Like

@pagio
Yes this good news.
I will wait for next Webmin update :+1:

Hi Ilia, as I stated earlier, I applied this patch. Do I need to revert it before webmin gets another update, or am I good?

No. Just update normally using your package manager.

2 Likes

This warning is not related to Webmin itself, which is why you don’t see a “2.6” update in the Webmin package manager.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.