mysql.sock

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jatindeepsharma
Posts: 70
Joined: Wed Apr 04, 2018 10:52 am

Re: mysql.sock

Post by jatindeepsharma »

lmiltchev wrote:Try:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pnagios nagios -e 'TRUNCATE TABLE nagios_logentries'
from the Nagios XI server or ssh into the offloaded mysql server, and run the command locally:

Code: Select all

mysql -u nagios -pnagios nagios -e 'TRUNCATE TABLE nagios_logentries'

Hi still getting, Access denied

mysql -h 10.200.1.152 -u nagios -pnagios nagios -e 'TRUNCATE TABLE nagios_logentries'
ERROR 1045 (28000): Access denied for user 'nagios'@'10.200.1.152' (using password: YES)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mysql.sock

Post by lmiltchev »

Is your password "nagios"? You didn't actually show it, so I am not sure...
[root@NagiosXI nagiosxi]# grep ndoutils -5 /usr/local/nagiosxi/html/config.inc.php |grep pwd
"pwd" => 'xxxxxx',
You need to use the actual password as defined in the /usr/local/nagiosxi/html/config.inc.php file.

Run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pxxxxxx nagios -e 'TRUNCATE TABLE nagios_logentries'
substituting "xxxxxx" with your actual password. For example, if your password was "welcome", you would run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pwelcome nagios -e 'TRUNCATE TABLE nagios_logentries'
I also hope that you followed all of the steps, outlined in our document here: https://assets.nagios.com/downloads/nag ... Server.pdf, granting permissions, testing the connection, etc. I would recommend that you double check that.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jatindeepsharma
Posts: 70
Joined: Wed Apr 04, 2018 10:52 am

Re: mysql.sock

Post by jatindeepsharma »

My actual password is nagios
jatindeepsharma
Posts: 70
Joined: Wed Apr 04, 2018 10:52 am

Re: mysql.sock

Post by jatindeepsharma »

lmiltchev wrote:Is your password "nagios"? You didn't actually show it, so I am not sure...
[root@NagiosXI nagiosxi]# grep ndoutils -5 /usr/local/nagiosxi/html/config.inc.php |grep pwd
"pwd" => 'xxxxxx',
You need to use the actual password as defined in the /usr/local/nagiosxi/html/config.inc.php file.

Run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pxxxxxx nagios -e 'TRUNCATE TABLE nagios_logentries'
substituting "xxxxxx" with your actual password. For example, if your password was "welcome", you would run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pwelcome nagios -e 'TRUNCATE TABLE nagios_logentries'
I also hope that you followed all of the steps, outlined in our document here: https://assets.nagios.com/downloads/nag ... Server.pdf, granting permissions, testing the connection, etc. I would recommend that you double check that.


I have two servers, one is NagiosXI(10.200.1.150) & other is 10.200.1.152(nagiossql), I ran above command on nagios sql server but its providing me output as:
jatindeepsharma
Posts: 70
Joined: Wed Apr 04, 2018 10:52 am

Re: mysql.sock

Post by jatindeepsharma »

jatindeepsharma wrote:
lmiltchev wrote:Is your password "nagios"? You didn't actually show it, so I am not sure...
[root@NagiosXI nagiosxi]# grep ndoutils -5 /usr/local/nagiosxi/html/config.inc.php |grep pwd
"pwd" => 'xxxxxx',
You need to use the actual password as defined in the /usr/local/nagiosxi/html/config.inc.php file.

Run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pxxxxxx nagios -e 'TRUNCATE TABLE nagios_logentries'
substituting "xxxxxx" with your actual password. For example, if your password was "welcome", you would run:

Code: Select all

mysql -h 10.200.1.152 -u nagios -pwelcome nagios -e 'TRUNCATE TABLE nagios_logentries'
I also hope that you followed all of the steps, outlined in our document here: https://assets.nagios.com/downloads/nag ... Server.pdf, granting permissions, testing the connection, etc. I would recommend that you double check that.


I have two servers, one is NagiosXI(10.200.1.150) & other is 10.200.1.152(nagiossql), I ran above command on nagios sql server but its providing me output as:
Dear Team/lmiltchev,
mysql -h 10.200.1.152 -u nagios -pwelcome nagios -e 'TRUNCATE TABLE nagios_logentries' command worked for me & my server is working fine after repairing database. thank you so much guys for your cooperation 8-)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: mysql.sock

Post by lmiltchev »

I am glad I could help! I will be locking this topic now. If you have any further questions/issues, please start a new thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked