Manual Install Fails On MySQL Loads

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
timlwhite
Posts: 11
Joined: Mon Aug 19, 2013 3:09 pm

Manual Install Fails On MySQL Loads

Post by timlwhite »

Hello -

I have a 64-bit CentOS 6.4 machine that had Nagios Core on it, that I am trying to install XI (2012 R2.3) on manually.

I first uninstalled Nagios Core using rpm uninstallers and even deleting the /etc/nagios directory.

When I run the manual installer from /tmp/nagios, the subcomponent install for ndoutils (and nagiosql) both fail with something like:

Code: Select all

ERROR 1050 (42S01) at line 49: Table 'nagios_commands' already exists
(for NDOUtils)

or

Code: Select all

ERROR 1050 (42S01) at line 352: Table 'tbl_hosttemplate' already exists
(for NagiosQL)

I've gone into mysql and done 'drop database' and 'drop user' for both the nagios and nagiosql databases and matching users; and I still get this error for both.

What can I do to reset the mysql install such that these scripts will install?

Thanks!

Tim
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Manual Install Fails On MySQL Loads

Post by slansing »

Well idealy you would remove the mysql DB and let it reinstall with Nagios XI. Nagios XI requires a clean base system to install properly, anything else and there can be unforeseen issues. Can you not totally remove the database and let Nagios XI re install it?
timlwhite
Posts: 11
Joined: Mon Aug 19, 2013 3:09 pm

Re: Manual Install Fails On MySQL Loads

Post by timlwhite »

Well, that's what I've done; I dropped every database inside mysql. There is nothing in there as far as I can tell. I'm not sure how else to remove the database?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Manual Install Fails On MySQL Loads

Post by abrist »

Did you restart mysqld afterwards?

Code: Select all

service mysqld restart
Are the database files still on the disk:

Code: Select all

ls -la /var/lib/mysql/
ls -la /var/lib/mysql/nagios*
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.
timlwhite
Posts: 11
Joined: Mon Aug 19, 2013 3:09 pm

Re: Manual Install Fails On MySQL Loads

Post by timlwhite »

Ah - looks like with MySQL, even after dropping things, you have to do a FLUSH TABLES and FLUSH PRIVILEGES to clear all the caches.

Once I did that, I was able to get past this error...on to the next one. :)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Manual Install Fails On MySQL Loads

Post by abrist »

Great. We will close the thread, though feel free to open a new one when your next error stumps you. Cheers.
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