NagiosXI Mysql database login error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

NagiosXI Mysql database login error

Post by MOHANREDDY »

Hello,

when I tried to login to mysql database console, I am not able to login as lack of access.

[root@server scripts]# mysql -u root -p 'nagiosxi'
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


whats the default root password for MySQL and Nagios user?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI Mysql database login error

Post by scottwilkerson »

Try without the space after -p

Code: Select all

mysql -u root -pnagiosxi
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: NagiosXI Mysql database login error

Post by MOHANREDDY »

scottwilkerson wrote:Try without the space after -p

Code: Select all

mysql -u root -pnagiosxi

it didn't work for me
mysql -u root -pnagiosxi
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


I ran repair databases it ran successfully without any errors. here is the output.

- recovering (with sort) MyISAM-table 'xi_users.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============

=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded

tail -n /var/log/mariadb/mariadb.log
tail: /var/log/mariadb/mariadb.log: invalid number of lines
[root@nsc-dev-maost-nagios-01 scripts]# tail -n 20 /var/log/mariadb/mariadb.log
180418 17:05:37 InnoDB: Shutdown completed; log sequence number 1601180
180418 17:05:37 [Note] /usr/libexec/mysqld: Shutdown complete

180418 17:05:37 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
180418 17:05:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180418 17:05:37 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 22814 ...
180418 17:05:37 InnoDB: The InnoDB memory heap is disabled
180418 17:05:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180418 17:05:37 InnoDB: Compressed tables use zlib 1.2.7
180418 17:05:37 InnoDB: Using Linux native AIO
180418 17:05:37 InnoDB: Initializing buffer pool, size = 128.0M
180418 17:05:37 InnoDB: Completed initialization of buffer pool
180418 17:05:37 InnoDB: highest supported file format is Barracuda.
180418 17:05:37 InnoDB: Waiting for the background threads to start
180418 17:05:38 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1601180
180418 17:05:38 [Note] Plugin 'FEEDBACK' is disabled.
180418 17:05:38 [Note] Server socket created on IP: '0.0.0.0'.
180418 17:05:38 [Note] Event Scheduler: Loaded 0 events
180418 17:05:38 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.52-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server



I tried to view all the Nagiosxi mysql databases but I cant login
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI Mysql database login error

Post by scottwilkerson »

You would need to ask your systems administrator what the root password for mysql is

I only gave you the default if you didn't set one
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked