Page 1 of 1

ERROR 1007 (HY000) at line 4: Can't create database 'nagiosx

Posted: Fri Dec 04, 2020 10:41 am
by amane
Hi,

We are trying manual offline installation for Nagiox XI version nagiosxi-5.7.2.

However we are getting below mentioned error while installation.

MySQL running - continuing... ./init-xidb: line 33: [: -eq: unary operator expected Setting up Nagios XI database... mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1007 (HY000) at line 4: Can't create database 'nagiosxi'; database exists ERROR: Nagios XI database was not setup properly - exiting. RESULT=1 =================== INSTALLATION ERROR! =================== Installation step failed - exiting. Check for error messages in the install log (install.log). If you require assistance in resolving the issue, please include install.log in your communications with Nagios XI technical support. The script that failed was: './B-installxi'

Please help us to resolve this issue.

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Fri Dec 04, 2020 4:07 pm
by dchurch
Sounds like there's a database already existing in your database server called "nagiosxi". Did you start from a fresh OS install, or are you upgrading an existing Nagios XI installation?

Sometimes if the database creation is interrupted, it can lead to issues like this.

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Mon Dec 07, 2020 4:35 am
by amane
Hi dchurch,

This is fresh installation.

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Mon Dec 07, 2020 10:48 am
by dchurch
  • Are you trying to use a database that's not running on the same server as Nagios XI?
  • Are you using the default passwords to set up the database? In this case it would be nagiosxi / n@gweb.

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Thu Dec 10, 2020 5:43 pm
by dchurch
Hi amane,

Just checking in since we haven't heard from you in a while. Did you get this working?

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Fri Dec 11, 2020 9:19 am
by amane
Hi dchurch,

This is fresh installation, no other application is running on server.

Just for the information, we are trying offline installation.

nagiosxi db is exists but looks like it's corrupted... Can we remove the nagiosxi database and install it again?

Is there any way to fix nagiosxi db?

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Fri Dec 11, 2020 11:13 am
by amane
Hi dchurch,

We got an installation complete message but we are getting "The website declined to show this webpage" after clicking Finish Install button on
Nagios XI installation page.

Nagios XI Installation Complete! -------------------------------- You can access the Nagios XI web interface by visiting: http://172.26.231.90/nagiosxi/ [root@lxappnagiprdw01 nagiosxi]#

Re: ERROR 1007 (HY000) at line 4: Can't create database 'nag

Posted: Fri Dec 11, 2020 1:52 pm
by dchurch
If you PM me a system profile I can diagnose further. Get one by going to Admin (top menu) => System Profile (in the left menu), then clicking the blue button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.