Synology SNMP Monitoring with LibreNMS - Could not connect to database

Hi, there.

I’m following this tutorial. I am doing this on a DS418play with 6GB or RAM.

So, I am going through the tutorial and I get to the " Configure LibreNMS Database & User Creation". That is when I start to run into problems. Whenever I run this command.

docker exec librenms setup_database

I get the error message of “Could not connect to database, check logs/librenms.log.” I check the logs (there’s a ton in there), and the only thing that I can see is “Access denied for user ‘librenms’@‘’ (using password: YES) at

I’ve ensured that the password in all of the configs is correct. Anything else I can try?

You need to set permission on your Syno MariaDB database to allow from 172 subnet (assuming you are still using Syno’s MariaDB as per previous post)

Access your Syno MariaDB CLI, and run the following:

I would suggest “dropping”/deleting the new LibreNMS DB and create a new one:


  • run this in your Syno MariaDB CLI
CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'librenms'@'%' IDENTIFIED BY 'libre_password';
CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'libre_password';
GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'%';

The command explained:
GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'%';
This allows all IP to access user “librenms”

If you are using MariaDB as container, following the tutorial as is should just work

If your DB is located in Syno’s MariaDB, run the above to enable access

and also check out this Error when setup database - #12 by fred

In your case it would be to allow all from

Syno’s firewall might be blocking access to Syno’s MariaDB