Webmin needs Perl module DBD::mysql after install?

I had some issues with Webmin connecting to the MariaDB database that was setup prior to install of Webmin.

I gave it the password but it wouldn’t connect. I got it to connect after going into the MariaDB database server, Module Config, Server Connection. And then manually setting:
MariaDB host to connect to: and MariaDB port to connect to: 3306. And giving it the correct password at Administration password. Although these were set to default and I thought these should have been the defaults.

And after it connected it said:

“Warning! The Perl module DBD::mysql is not installed on your system, so Webmin will not be able to reliably access your MariaDB database. Click here to install it now.”

So I’m wondering if it would have connected correctly if Perl module DBD::mysql would have been installed prior to installing Webmin. And also if Webmin was supposed to install that itself during the installation. If I should install Perl module DBD::mysql prior to installation, should I use CPAN or apt?
And are there other recommended perl modules I should install before installing Webmin?

Debian 12 REQUIRED
Webmin version 2.111 REQUIRED

Webmin install as far as I remember doesn’t install packages (unless its stuff it need to operate) like what happen with the Virtuamin stack.
Its a GUI configuration tool for whatsever is on the server. I don’t think it matter whether it done before or after.
The Click here to install it now , did you click and it should do it the correct way.
Virtualmin is pretty much package installs, webmin might be different.

So now I just told it to install the perl module. And it installed libdbd-mysql-perl with apt install. So if Webmin has some packages it requires prior to installing why aren’t they listed on the installation page at:

I don’t think there is any, just the webmin package itself.

I use to (in the old days) download the webmin.rpm and install that, and that was the only package that was needed, I presume its the same now.

It actually says it on that page dnf install webmin

That’s how I installed it. I’m using Debian so I use:
“apt-get install webmin --install-recommends”
But it doesn’t install libdbd-mysql-perl . Probably should be added. Unless there is a reason why it’s not.

apt-get install webmin --install-recommends libdbd-mysql-perl

Nope, install what is need for things to work. Webmin dosn’t care, its just used for GUI use.

Well it looks like it does install whatever --install-recommends does. I would suggest recommending libdbd-mysql-perl . But maybe they leave it out beause not everyone will be using mysql or mariadb. But maybe show optional packages on install page depending what is installed. Similar to how Wordpress.org does on their page.

1 Like

Are you using webmin’s virtualmin module from a webmin install or did you install virtualmin from the virtualmin install script? If the former that would explain the issues. To date I have never seen this issue using the virtualmin installer but I have seen it by installing webmin then adding virtualmin or by using the minimal flag on the installer

Webmin/Virtualmin is supposed to be installed on a clean OS. If done correctly it installs everything you need. Installing MariaDB is a mistake.

All this is done during the post-install wizard - no need for manual interference.

I’m just installing Webmin by itself. Not with Virtualmin. I’m using this page for instructions:

I just found this in the Webmin error log. I’m not sure what it’s from but maybe during the install?

[14/Jun/2024:04:50:02 -0700] [] /mysql/ : Perl execution failed : Can't locate view-lib.pl in @INC (@INC contains: /usr/share/webmin/vendor_perl /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl /usr/share/webmin/ . ..) at ./mysql-lib.pl line 8. Compilation failed in require at /usr/share/webmin/mysql/index.cgi line 5.

What are you doing ? Why not just install webmin, on a clean system, using apt install webmin assuming you installed Ubuntu or debian then install whichever webmin modules along with the underlying software you require (e.g nginx etc) and configure it correctly or just use the virtualmin install script, accept the defaults, get everything working then start to customize to suit the environment you want, most of your threads seem to include customisation lets get everything running first before learning how to customise

Webmin is not like Virtualmin. It does not try to install all of the dependencies you might need for the modules you might choose to use.

Many users don’t use MariaDB or MySQL, and thus would not need DBD::mysql. Likewise Webmin doesn’t depend on any of the other software it could manage. You wouldn’t want it to install hundreds of packages to accommodate the fact that you might want to manage an LDAP server or a DHCP server or BIND or Apache or whatever.

DBD::mysql is not a dependency of Webmin. It is a dependency for users who want to use the MySQL/Mariadb module (it works without it, but it gets additional features and faster performance if you have the bindings). And the module will tell you about things it needs when you try to use them, generally, and try to install them for you, if you ask

There are some dependencies in Webmin itself (not just for a specific module), and those are specified in the package (the module for SSL/TLS support, for instance).

So, no, it should not depend on DBD::mysql, as Webmin does not depend on it. It only uses it, if you want to use the MySQL/MariaDB module. Many people who use Webmin are not using MariaDB/MySQL.

I’m documenting what to do by creating shell scripts to setup the server quickly and correctly. So if I know what I need to install, like the perl module. Then I can add it the shell script so I document it and don’t have to install it manually. And then if I need to start over fresh I can do it pretty quickly.

And I’m glad I did it this way because I keep choosing either the wrong OS, wrong web server, or something goes wrong and need to start over. I"m trying to get the ideal setup. So starting fresh quick helps alot so I can test out what I want. And ChatGPT makes the shell scripting a breeze. So not that hard to setup.

I’m currently trying using Webmin with Cloudpanel and see if that works for me. I’m wanting to use Nginx because I’m going to try working with Node.js. And from what I understand thats work better with Nginx. And Nginx is faster than Apache. But I was having issues with Virtualmin LEMP. So decided to try out Cloudpanel. But it doesn’t offer a very good server manager. So installing it along with Webmin. But I heard they fixed some issues with Virtualmin so I might give it a shot again. But testing out Cloudpanel first.

ok that makes sense.

Not quite what i asked as @Joe pointed out webmin is totally different to using the virtualmin installer, i also have installed webmin and then installed and configured software for webmin to manage but it does take a bit of work to get the software to work in away that is acceptable. This may require a learning curve rather than the virtualmin installer which configures the software to work with virtualmin/webmin and adds the required dependencies, but from this thread you have found this out

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