New release Cacti 0.8.8 problem

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
dragosme55
Posts: 1
Joined: Wed Apr 04, 2012 1:55 am

New release Cacti 0.8.8 problem

Post by dragosme55 »

Good morning,
While the wait is over, and the new version is compatible with PHP 5.4, importing the .sql file into the database results in the following error:
mysql cacti < cacti.sql
ERROR 1064 (42000) at line 2170: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE
) ENGINE=MyISAM' at line 6
Is this a problem of MySQL or the cacti.sql is actually malformed or corrupt?

The previous version of Cacti imports the .sql file without any issues, but fails to run under php 5.4 and shows a blank page after installation finishes (I believe it is something related to mysqlnd).
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: New release Cacti 0.8.8 problem

Post by gandalf »

Please run the offending mysql statements directly into mysql, using mysql cli.
I fear, that the compalint is about the index specification as BTREE (which always was the default index type for a plain straight setup).
Please post output of

Code: Select all

show index from poller_output;
when running from mysql cli
R.
gg161
Posts: 3
Joined: Wed Apr 18, 2012 3:30 am

Re: New release Cacti 0.8.8 problem

Post by gg161 »

hi,
ran into same problem trying to install 0.8.8 from source on an old FC5 box that i cannot change easily, it has RPM installed php-5.1.2-5, rrdtool-1.2.23-0 and mysql-5.0.18-2.1, here is what you requested.

Code: Select all

mysql>
mysql> CREATE TABLE poller_output (
    ->   local_data_id mediumint(8) unsigned NOT NULL default '0',
    ->   rrd_name varchar(19) NOT NULL default '',
    ->   time datetime NOT NULL default '0000-00-00 00:00:00',
    ->   output text NOT NULL,
    ->   PRIMARY KEY (local_data_id,rrd_name,time) USING BTREE
    -> ) ENGINE=MyISAM;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE
) ENGINE=MyISAM' at line 6
mysql>
mysql> 
mysql> show index from poller_output;
ERROR 1146 (42S02): Table 'cacti.poller_output' doesn't exist
previous tables did appear to import

Code: Select all

mysql> show tables;
+---------------------------+
| Tables_in_cacti           |
+---------------------------+
| cdef                      |
| cdef_items                |
| colors                    |
| data_input                |
| data_input_data           |
...
...
thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: New release Cacti 0.8.8 problem

Post by gandalf »

There was a bug in MySQL 5.1.x. You may safely omit "USING BTREE" and rerun that command
R.
gg161
Posts: 3
Joined: Wed Apr 18, 2012 3:30 am

Re: New release Cacti 0.8.8 problem

Post by gg161 »

gandalf wrote:There was a bug in MySQL 5.1.x. You may safely omit "USING BTREE" and rerun that command
[cacti-0.8.8]$ mysql -u zzz -pzzz cacti < cacti.sql
[cacti-0.8.8]$

seems to have done the trick :) thanks.
tuux1598g
Posts: 9
Joined: Fri Sep 05, 2008 4:15 am

Re: New release Cacti 0.8.8 problem

Post by tuux1598g »

Ran into the same problem with upgrade from 0.8.7i -> 0.8.8, using MySQL 5.0.51a - fixed by changing the query slightly:

"PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE"

becomes

"PRIMARY KEY USING BTREE (`local_data_id`, `rrd_name`, `time`)"


Shaun
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: New release Cacti 0.8.8 problem

Post by gandalf »

tuux1598g wrote:Ran into the same problem with upgrade from 0.8.7i -> 0.8.8, using MySQL 5.0.51a - fixed by changing the query slightly:

"PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE"

becomes

"PRIMARY KEY USING BTREE (`local_data_id`, `rrd_name`, `time`)"


Shaun
That helps, yes. But MySQL since 5.0.60 accepts the other way which is the one published by the MySQL docs. So, IMHO, your workaround is a workaround, not a solution, But yes, it's absolutely fine in your case.
Don't get me wrong, but I don't like to introduce mayhem into Cacti to solve a problem of another software component.
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest