segunda-feira, 25 de abril de 2016

Librenms - dump database

We've had a few reports of database problems with the latest database schema update (055 -> 056).  Symptoms are that lots of pollers are running, but are unable to query the database due to the schema update taking a very long time.  This results in gaps in the graphs due to the hanging pollers.  On most systems, a simple restart of mysql seems to resolve the issue:

service mysql restart          # or equivalent on your distro
./discovery.php -h new         # run the schema update
On one system, a dump & reload of the LibreNMS database was necessary:
vi /etc/cron.d/librenms        # comment out all entries
ps -ef | grep librenms         # wait until all librenms processes are stopped, or kill them
cd /opt/librenms               # (or your install location, if not the standard)
mysqldump --add-drop-database librenms > librenms-backup.sql
mysql librenms < librenms-backup.sql
./discovery.php -h new         # run the schema update
vi /etc/cron.d/librenms        # uncomment all entries to start pollers again



---- ou 

https://dev.mysql.com/doc/workbench/en/wb-admin-export-import-management.html 

---- log all queries from mysql

http://dba.stackexchange.com/questions/62129/how-to-log-all-mysql-queries-into-log-file 

--- liberar acesso remoto a mysql
https://rbgeek.wordpress.com/2014/09/23/enable-remote-access-of-mysql-on-ubuntu/


https://elias.praciano.com/2014/03/mysql-use-o-mysqlcheck-para-fazer-manutencao-das-suas-tabelas/

0 comentários: