Troubles trying to connect Bareos with Mysql Db

Posted December 7, 2019 1.2k views


i’m facing some troubles trying to connect Bareos with a db hosted in here.

Actually both are in separated dropplets.

Is there any way to add in the client more information regarding connection to the DB?

Client {
Name = svennd
Address =
Password = alfa123

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @aguerrero,

I’ve gone through the documentation of Bareos and there are a few more settings you’ll need to add to your code. Here is the exact page needed -

You’ll need to specify the port as a first.

Additionally, since you are trying to connect from another droplet, you’ll need to allow connections to it from your DB droplet. For that, you can use iptables.

The following rule executed on your DB droplet

iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

will allow connections to port 3306, where your MySQL should be listening to. This will allow connections from all IP addresses not only your other droplet. As such, it’s not highly recommended to use it. It’s quite better to use

iptables -I INPUT -p tcp -s --dport 3306 -j DROP
iptables -I INPUT -p udp -s --dport 3306 -j DROP

You’ll need to replace * with the actual IP address of the droplet *your application is on.

To summarize, you’ll need to edit your configuration file according to the documentation in order to at least specify port. As soon as this has been done, you’ll need to allow access from your DB droplet to your Application droplet to the MySQL/MariaDB instance.