Can not login with user and pass in librenms

I install librenms on centos7 and apache . step by step via librenms installer help but when insert user and password in login step , come this error:
access denied for user ‘librenms’@‘localhost’ (using password: YES)

who to fix this ?
and what is mean password: yes?
note: it is similar the values in config.php and .evn files .
when validate.php have 2 errors ::
DB --》 not connect
mysql --》? ( not show version of mariadb)

Hello

1 - Login using mysql directly to prove out credentials Daily Update Fail - Could not connect to database

2 - Wrap .env password in quotes SQLSTATE[HY000] [1045] Access denied for user 'librenms'@'localhost' and ensure not using any odd characters in your password e.g å #

2 Likes

Hello . thanks for replay . chek your Links .
I connect to mysql database with root user and see list of users with password,host.

SELECT host, user,password FROM mysql.user;
result table : show many user that root and one user librenms:
| 127.0.0.1 | librenms | DE557801B89E8E33FEB124265E9271709520E65B |
but when config file such as “config.php” , “.env” . “database.php” for bellow parameters ::
$config[‘db_host’] = ‘127.0.0.1’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘my pass’;
$config[‘db_name’] = ‘librenms’;
and insert user librenms with password in login page of ilbrenms web , coming that Erroe ( access denied for user ‘librenms’@‘localhost’ (using password: YES) )
I think that this error regarding user or password of user , so once change password of user in mysql with :
UPDATE mysql.user SET authentication_string = PASSWORD(‘my pass’) WHERE User = ‘librenms’ AND Host = ‘127.0.0.1’;
and password changed but not logging and that Error .
In the secondary Creat New uaer By name “Librenms” and host “localhost” with new “password” with command on Mysql ::
CREATE USER ‘librenms’@‘localhost’ IDENTIFIED BY ‘My pass’
GRANT ALL PRIVILEGES ON librenms.
TO ‘librenms’@‘localhost’;
and see table of user, password,host with ::
SELECT host, user,password FROM mysql.user;
show ::
| 127.0.0.1 | librenms | *DE557801B89E8E33FEB124265E9271709520E65B |
| localhost | librenms | *296505D404E0C418AB374C99E5BC50303C00DAA1 |
then set parameters in 3 files “config.php” , “.env” . “database.php” with new values ::
$config[‘db_host’] = ‘localhost’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘my pass’;
$config[‘db_name’] = ‘librenms’;
this time when insert user librenms and password in webUI , no that Error (access denied for user ‘librenms’@‘localhost’ (using password: YES))
but i have this message in site ::

Whoops, looks like something went wrong. Check your librenms.log.

chech librenms.log ::
[2020-01-21 11:49:01] production.ERROR: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.config’ doesn’t exist in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
And when run validate.php in Termina coming Results ::
[root@librenms-server librenms]# ./validate.php

Component Version
LibreNMS 1.59-39-g0b18ae7
DB Schema No Schema (0)
PHP 7.2.24
MySQL 5.5.64-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Composer Version: 1.9.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Time between this server and the mysql database is off
Mysql time 2020-01-23 10:46:44
PHP time 2020-01-23 07:16:44

[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[FAIL] You have no timezone set for php.
[FIX]:
PHP: Runtime Configuration - Manual
[WARN] You have not added any devices yet.
[FIX]:
You can add a device in the webui or with ./addhost.php
[WARN] Your install is over 24 hours out of date, last update: Sun, 19 Jan 2020 21:31:40 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
config/database.php

Are you sure you followed the docs?

1 Like

Thanks , I fix the problem step by step and ok.
when login the webUI and want to add device ::


in Menu Devices → No Device
not show ADD Device .

check user “librenms” in webUI and users my setting ::


Device Permission → No Access!
perhaps , this is the reason that no show ADD Device in Device Menu ?!

user that login in librenms webUI :
user : librenms
password: my pass
Host : localhost
Select_priv : N

when reset server and ru validate.php show this Error to fix :

Something seems to have gone wrong during your install, is this the doc you followed? https://docs.librenms.org/Installation/Installation-CentOS-7-Apache/

Run those commands in your screenshot and try add an admin user again to see if you can get it working https://docs.librenms.org/Installation/Installation-CentOS-6-Apache-Nginx/#create-admin-user

Otherwise i would re-install

1 Like

in installation centos 7 Apache doc , 3 way say for install php , which way is complete or bather than the other ?
one way install php 7.3
two way install php 7.2 but when install no 3 , in the next steps and when start httpd come error .
for fix this error must yum install rh-php…
Now what of 3 way install php that is complete pakages and not have problem for next install librenms steps ?

Hi , I solved all problems . for lnstall librenms in instalation document’s librenms , I install php with CentOS SCL php but after install thats packages , we need to install another package with command :
yum install rh-php72-php
then perform next steps and finish install .
inter ip your server in browser and appear librenms page and insert DB_pass in to password box and next to receve this page :
config.php file in /opt/librenms is not exist .
copy the contents bellow this message and in coomand terminal create file config.php :
cd /opt/librenms
vi config.php
past contents in this file and write and quit .
now in :
/opt/librenms
command :
./validate.php
have two Fail :
1- fail : list of many files ( ./script/github-remove) and fix with :
su librenms -
/opt/librenms/scripts/github-remove -d
2- fail : set permission for librenms user
that the bellow this fail , has 3 commands for fixing the problem .
Thanks for Chas and Kevin_Krumm

1 Like

Great job! glad you got it working

2 Likes