Hi
I'm trying to upadte my 2011 to the latest 2012 version
Latest Available Version: 2012R2.5
Installed Version: 2011R3.3
Upgrading stops with ;
Stopping nagios : done
Starting nagios : done
NagiosQL failed to update user table!
Duplicate column name 'locale'
Any hints to resolving this ?
Thanks
Upgrading fails Duplicate column name 'locale'
Re: Upgrading fails Duplicate column name 'locale'
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Upgrading fails Duplicate column name 'locale'
Yep. I presume the column exists, correct? (its DEFAULT value should be 'EN_en') If it does, you can comment out lines #26-42 of the file:
The lines to comment out are:
Let me be clear here. Only comment out these lines if the 'locale' column exists in the nagiosql database and it is populated with 'EN-en'.
Code: Select all
/tmp/nagiosxi/subcomponents/nagiosql/db_upgrades.php
Code: Select all
if(intval($oldversion) < 304) {
if(db_connect_select($dba)) {
$query = "ALTER TABLE tbl_user ADD COLUMN locale VARCHAR(6) DEFAULT 'en_EN'";
if(!mysql_query($query)) {
echo "NagiosQL failed to update user table!\n".mysql_error()."\n";
exit(1);
}
else {
echo "NagiosQL user table updated successfully!\n";
exit(0);
}
}
else {
"Unable to connect to NagiosQL database!\n";
exit(1);
}
}
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.
"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.
Re: Upgrading fails Duplicate column name 'locale'
Worked like a dream Thanks
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Upgrading fails Duplicate column name 'locale'
Excellent, do you have any other questions on this?