Failed to connect to the Bacula database – Webmin error

Bacula is a network based backup solution for System Administrators to manage  disaster recovery environment.  This is an Open source program offering many advanced storage management features. If anyone looking for a free backup solution Bacula is a MUST use tool. One cool thing is that, it can be added as a module in Webmin control panel. Webmin allows easy manage of Bacula Administration as we don’t need to edit the configuration files directly.

For managing Bacula it’s necessary to enable this module via Webmin Admin console. Most common error found while enabling the module is related to “perl-DBD-MySQL”. The error should be something as follows:

Failed to connect to the Bacula database : Failed to load the database DBI driver mysql at ./ line 44. Maybe it is not set up, or the module configuration is incorrect

It occurs as the perl module “DBD::mysql” [ MySQL driver for the Perl5 Database Interface (DBI) ] is not installed in the server. To fix the issue you need to install the module using either of the below given method.

First one, using cpan. This can be done via cpan console.

[root@webminhost01 ~]# cpan
Terminal does not support AddHistory.
cpan shell — CPAN exploration and modules installation (v2.00)
Enter ‘h’ for help.
cpan> install DBD::mysql

With this it will install the required perl module.

Second option is using yum.

[root@webminhost01~]# yum install perl-DBD-MySQL

Once this is done. You will be able to load the module configuration of Bacula backup system from Webmin Panel.

There is also an option to install the required module via Webmin Panel itself. You can use either “Software Packages” or “Perl Modules” option from Webmin panel in case you want to avoid playing with Linux shell.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts