Page 4 of 4

Re: Problem with NDOUtils

Posted: Thu Aug 24, 2017 4:39 pm
by scottwilkerson
Not knowing completely how this was installed we could hit other problems, however from inside the db directory you may be able to do the following:

Code: Select all

sed -i "s/TYPE/ENGINE/g" ./*.sql
When these scripts were written 10 years ago the TYPE directive was proper however it has been switched to ENGINE and type was deprecated in MySQL/Mariadb 5.5

Re: Problem with NDOUtils

Posted: Fri Aug 25, 2017 7:51 am
by Cristhian_Plaza
scottwilkerson wrote:Not knowing completely how this was installed we could hit other problems, however from inside the db directory you may be able to do the following:

Code: Select all

sed -i "s/TYPE/ENGINE/g" ./*.sql
When these scripts were written 10 years ago the TYPE directive was proper however it has been switched to ENGINE and type was deprecated in MySQL/Mariadb 5.5
Ok.., now jajaajja we are having progress although I got another error.., I think this is easiest to solve. What can you tell me about the error?

Code: Select all

[root@ip-10-0-8-150 db]# ./upgradedb -u xxxx -p xxxx -h localhost -d xxxx
Current database version: 1.4b2
** DB upgrade required for 1.4b3
     Using mysql-upgrade-1.4b3.sql for upgrade...
ERROR 1060 (42S21) at line 123: Duplicate column name 'last_state'
Upgrade from mysql-upgrade-1.4b3.sql failed at ./upgradedb line 106.

Re: Problem with NDOUtils

Posted: Fri Aug 25, 2017 12:19 pm
by scottwilkerson
We need to stop for a minute, the command is listing

Code: Select all

Current database version: 1.4b2
But previously you showed that ndo2db version was 2.1.2

At this point, if it has never actually worked correctly, and you do not have data that you risk losing, I would highly recommend NOT doing the upgrade, and remove the existing database, and running the install script instead

Code: Select all

mysql -u root -p

> DROP DATABASE nagios;
> CREATE DATABASE nagios;
Create a username/password that has at least the following privileges for the database:

Code: Select all

SELECT, INSERT, UPDATE, DELETE
then:

Code: Select all

./installdb  -u xxxx -p xxxx -h localhost -d xxxx