Error connecting to database

Maybe the best solution is installing the machine from scratch again…I didn´t have much configuration done, there´s no problem setting up again…

Yes I did it :+1:t2:

grep db_ /opt/librenms/config.php

root@srv-snmp-01:/opt/librenms# grep db_ /opt/librenms/config.php
$config[‘db_host’] = ‘localhost’;
$config[‘db_port’] = ‘3306’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘xxxx’;
$config[‘db_name’] = ‘librenms’;
$config[‘db_socket’] = “/var/run/mysqld/mysqld.sock”;
#$config[‘db_socket’] = ‘’;

Same problem today

after this comand
mysqlcheck --auto-repair + reboot server
problem solved :roll_eyes:
since 24~48h the error message has disappeared

Running this command returns an error saying I’m leaving out the option. When I use option -A for all databases, I get “Can’t connect to local MySQL server through socket '/var/run/mysqld/mys”. All of the above results from Akimace match mine. The error message is the same and the logs are the same. I had the same failure with the VM that Akimace had that seems to have corrupted the database.

I simply started the mysql and it worked

Hi, I have this same error on the front end and seeing the same error in the log files:

production.ERROR: Cannot use object of type stdClass as array {“exception”:"[object] (Error(code: 0): Cannot use object of type stdClass as array at /opt/librenms/poller.php:133)

[previous exception] [object] (PDOException(code: 1040): SQLSTATE[HY000] [1040] Too many connections at >
[stacktrace]

This is a working system that occasionally shows this error.

Has anyone found any solutions to this?

Thanks