Report this

What is the reason for this report?

Troubles trying to connect Bareos with Mysql Db

Posted on December 7, 2019

Hello,

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 = 8.8.8.8 Password = alfa123 }



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!

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.

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 - https://docs.bareos.org/TasksAndConcepts/CatalogMaintenance.html

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 0.0.0.0/0 --dport 3306 -j DROP
iptables -I INPUT -p udp -s 0.0.0.0/0 --dport 3306 -j DROP

You’ll need to replace **0.0.0.0/0 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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.