Troubles trying to connect Bareos with Mysql Db


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 }

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

Regards, KDSys