Help with librenms user password and MariaDB

I’m not able to log in to MariaDB to run a command/make changes/etc. I have two issues.

  1. I can’t get into MariaDB, I’m using this command ‘/usr/bin/mysql’ and according to my notes a password box appears and I simply press enter (that’s what I referenced in my notes) and the next prompt I saw was MariaDB where I could work in that database. From this point, my notes say to type ‘use librenms;’ and the prompt should change to MariaDB [librenms]> but I can’t get this far.

I also tried ‘/usr/bin/mysql -u root -p’ which prompts me for the librenms password and I don’t seem to have that documented. Either I deleted it accidentally or forgot to document that password.

  1. I don’t have the password that I used for the DB connection that I followed in the install guide. I’m not sure that I need that password, now, but is it possible to get into the config file where that password is stored to see what it is?

I’ve only had to make changed to MariaDB 1 or 2 times since initial install, I’m not sure why I was able to get in before and I can’t get in there, now. I am following the same notes I followed last time, I guess if I did delete a password last time I used these notes, I must not have realized it or else I would have corrected the deletion I made.

The server is running fine other than this minor inconvenience.

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

Component Version
LibreNMS 23.1.0-32-g7e9e360c9 (2023-02-20T17:42:42-06:00)
DB Schema 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP 8.1.2-1ubuntu2.10
Python 3.10.6
Database MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

Thanks.

The username and password should be in your .env file - try cat .env in your librenms base directory.

Then mysql librenms -u librenms -p for example.

That’s mysql {database} -u {username} -p which you’ll get from the DB_DATABASE and DB_USERNAME lines in the .env file.

1 Like

Thank you, that got me in, I appreciate it.

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