I was advice by one the Nagios engineer while doing the demo explaining the Nagios XI function and features. So this was the told to clear the ton of logs. I'm not really familiar with mysql, any help will be great.
mysql> echo 'TRUNCATE TABLE nagios_logentries;' | mysql -u root -p nagiosxi nagios;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ht syntax to use near 'echo
Thanks,
Ravi Ponnaiah
mysql TRUNCATE TABLE!!!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: mysql TRUNCATE TABLE!!!
That command is for if you are not logged in to mysql. Since you are, you can simply run the following...assuming you are using the nagios db:
TRUNCATE TABLE nagios_logentries;
If you are not using the nagios db, just run the following command first:
use nagios;
If you logged in as root, you should have access to do this on nagios db.
TRUNCATE TABLE nagios_logentries;
If you are not using the nagios db, just run the following command first:
use nagios;
If you logged in as root, you should have access to do this on nagios db.
Re: mysql TRUNCATE TABLE!!!
ok got it thanks.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: mysql TRUNCATE TABLE!!!
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!