Change mysql DB default password

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Change mysql DB default password

Post by xlin125 »

If a password for mysql DB is not provided when running "fullinstall" to install a new Nagios XI server, the default password will be used. Certainly, there is an securitry concern with using a default password for mysql DB. Is the use of a non-default password for mysql DB recommended? This can be done when running "fullinstall" with an option "-p $newpd". Or can the password for mysql DB be changed after the Nagios XI installation and what steps need to be taken? Are there any concerns to use a non-default password for mysql DB? What are the impacts and/or things needed to be addressed if changing the default password for mysql DB after the installtion or during the installation of the Nagios XI? Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Change mysql DB default password

Post by ssax »

If you change the root password you should update it in:

Code: Select all

/root/scripts/automysqlbackup
Any other mysql DB user password changes should be updated in:

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Change mysql DB default password

Post by xlin125 »

Thanks for the quick response.

If I select a password when I run "fullinstall" with -p option, then I will not need to do anything or update any files such as /root/scripts/automysqlbackup because the selected password should be in this file ("PASSWORD=$selected_password"), correct? Is it recommended to pick a password insteading taking the default one for mysql DB? Thanks.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Change mysql DB default password

Post by abrist »

xlin125 wrote:If I select a password when I run "fullinstall" with -p option, then I will not need to do anything or update any files such as /root/scripts/automysqlbackup because the selected password should be in this file ("PASSWORD=$selected_password"), correct?
I believe so, though if you do run into an issue with the -p switch, let us know.
xlin125 wrote:Is it recommended to pick a password insteading taking the default one for mysql DB? Thanks.
It all depends on your environment. If you do change the password, make sure to note the new password somewhere in case one of our support techs needs to assist you.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked