Error 1101 on running sql script file

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

Moderators: Moderators, Developers

Post Reply
Author
Message
sker
Posts: 6
Joined: Tue Jul 31, 2007 7:54 am

Error 1101 on running sql script file

#1 Post by sker » Tue Jul 31, 2007 9:32 am

I have created a fresh install of Cacti on the following platform

Operating System: win2K3 sp2
Webserver: IIS
Cacti: 0.8.6j
Cactid: 0.8.6i
MySQL: 5.0.45-community-nt MySQL Community Edition
PHP: 5.2.3
RRDTool (Cygwin or Win32 version): 1.2.15 win32

When I run the table create script I get the following.

>mysql --user=root --password cacti <c:\cacti.sql
Enter password: *******
ERROR 1101 (42000) at line 1890: BLOB/TEXT column 'oid' can't have a default value


line being refered to in the sql file that is failing is

CREATE TABLE host_snmp_cache (
host_id mediumint(8) unsigned NOT NULL default '0',
snmp_query_id mediumint(8) unsigned NOT NULL default '0',
field_name varchar(50) NOT NULL default '',
field_value varchar(255) default NULL,
snmp_index varchar(255) NOT NULL default '',
oid TEXT NOT NULL default '',
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;

Any idea how to correct this problem. I had version running OK with mysql4xxx

Thanks
Sker

sker
Posts: 6
Joined: Tue Jul 31, 2007 7:54 am

#2 Post by sker » Tue Jul 31, 2007 10:44 am

Sorry found my problem with the MYsql setup. I hadn't uhcecked an option on the install :oops:

Luis Gardea
Posts: 23
Joined: Wed Apr 13, 2005 4:20 pm

error 1101

#3 Post by Luis Gardea » Wed Aug 01, 2007 11:14 am

I have the same problem.


Can you tell me the change in your mysql?


thanks

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

#4 Post by BSOD2600 » Wed Aug 01, 2007 11:23 am

Read the installation guide in my signature. sql-strict mode is bad.

Post Reply