Install problem

I following Docs to install LibreNMS on Ubuntu 20.04.3 LTS.

But on config LibreNMS WebUI step, web site have show below screen and on ‘validate’ show cannot connect database.

[email protected]:~$ ./validate.php

Component Version
LibreNMS 21.12.0
DB Schema Not Connected (0)
PHP 7.4.3
Python 3.8.10
MySQL ?
RRDTool 1.7.2
SNMP 5.8

====================================

[OK] Composer Version: 2.1.14
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.

And log error massage is :

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000] [1045] Access denied for user ‘librenms’@‘localhost’ (using password: NO) in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18

How can I solve this problem?

I can’t see the full screenshot but try checking manually on the cli with the mysql tool to see if the details are in fact ok. mysql -u USERNAME -p -h HOSTNAME

I try is can access SQL server and SQL service is run normal.

mysql -u librenms -p -h 127.0.0.1

[email protected]:~$ mysql -u librenms -p -h 127.0.0.1
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 55182
Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>

[email protected]:~$ sudo systemctl status mariadb
[sudo] password for hkykl:
● mariadb.service - MariaDB 10.3.32 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-12-22 14:45:51 HKT; 23h ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 6254 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 6266 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 6271 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=cd /usr/bin/..; /usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 6356 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 6358 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Main PID: 6325 (mysqld)
Status: “Taking your SQL requests now…”
Tasks: 35 (limit: 2202)
Memory: 88.5M
CGroup: /system.slice/mariadb.service
└─6325 /usr/sbin/mysqld

Dec 22 14:45:50 l1 systemd[1]: Stopped MariaDB 10.3.32 database server.
Dec 22 14:45:50 l1 systemd[1]: Starting MariaDB 10.3.32 database server…
Dec 22 14:45:51 l1 mysqld[6325]: 2021-12-22 14:45:51 0 [Note] /usr/sbin/mysqld (mysqld 10.3.32-MariaDB>
Dec 22 14:45:51 l1 systemd[1]: Started MariaDB 10.3.32 database server.
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6360]: Upgrading MySQL tables if necessary.
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6363]: Looking for ‘mysql’ as: /usr/bin/mysql
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6363]: Looking for ‘mysqlcheck’ as: /usr/bin/mysqlcheck
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6363]: This installation of MySQL is already upgraded to 10.3.32-MariaDB, use --force if you still need to run mysql_upgrade
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6371]: Checking for insecure root accounts.
Dec 22 14:45:51 l1 /etc/mysql/debian-start[6375]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables

Have you specified the exact same details in the web installer as you did in the cli client?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.