sql error 1064

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
vijayakumar
Posts: 9
Joined: Wed Jul 11, 2007 6:58 am
Location: pune
Contact:

sql error 1064

Post by vijayakumar »

Hai friends,

Am getting following problem can you people help me out...........??????

ERROR 1064 (42000) at line 1890: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to us
e near ''',
PRIMARY KEY (host_id,snmp_query_id,field_name,snmp_index),
KEY host_id ' at line 7

Cacti----cacti-0.8.6j
php------php-5.2.3
OS-----WIN-XP
mysql-5.0.41
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) You get that error when doing what?

2) have you followed my installation guide (in signature), specially for mysql configuration?
vijayakumar
Posts: 9
Joined: Wed Jul 11, 2007 6:58 am
Location: pune
Contact:

sqlm error

Post by vijayakumar »

hai Buddy,
thanks for the help .....
I have gone through ur installation guide ,

Now my problem is When am trying to import the cacti.sql file to cacti database am getting above mentioned error.I have gone through cacti database in MYSQL Server ,before error it has made 22 tables and not able to make tables after host_graph...

Specificcally mentioning means its not able to make table with the command below in cacti.sql

CREATE TABLE host_snmp_cache (
host_id mediumint(8) unsigned NOT NULL ,
snmp_query_id mediumint(8) unsigned NOT NULL ,
field_name varchar(50) NOT NULL default ,
field_value varchar(255) default NULL,
snmp_index varchar(255) NOT NULL default ,
oid TEXT NOT NULL,
PRIMARY KEY (host_id,snmp_query_id,field_name,snmp_index),
KEY host_id (host_id,field_name),
KEY snmp_index (snmp_index)
) TYPE=MyISAM;


error is at
PRIMARY KEY (host_id,snmp_query_id,field_name,snmp_index),
KEY host_id (host_id,field_name),

waiting for suggestions

Thanks in advance......................
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Sound like sql-strict mode is enabled in my.ini. Per the installation guide, you must DISABLE it (aka comment it out).
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Not 100% sure that is the issue. What version of MySQL?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
vijayakumar
Posts: 9
Joined: Wed Jul 11, 2007 6:58 am
Location: pune
Contact:

Post by vijayakumar »

I am using mysql version 5.0.41..
vijayakumar
Posts: 9
Joined: Wed Jul 11, 2007 6:58 am
Location: pune
Contact:

Post by vijayakumar »

Hai friends,

I recovered that problem..............

it might be because of file cacti.sql .

I replaced the same with oe lower version and its working fine now...


Thanks for the help..........


Now my problem is http://localhost/cacti doesnot giving any images.......

can you help me out......................



Regards........


vijayakumar
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

vijayakumar wrote:I replaced the same with oe lower version and its working fine now...
Wait a minute, you took a cacti.sql from an OLDER release?? If so, very bad idea, since the mysql tables tend to change from release to release.

As for your graph problem, read http://forums.cacti.net/viewtopic.php?t=11747
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests