Page 1 of 1

Problems with Mysql

Posted: Mon Nov 14, 2005 8:18 pm
by germandms
when I execute
# mysql < db/zmschema.sql -p
Enter password:
ERROR 1136 (21S01) at line 378: Column count doesn't match value count at row 1

I have suse 10.0 kernel 2.6.13
and /zm-1.21.4

Thank You

Posted: Mon Nov 14, 2005 8:38 pm
by cordel
Try replacing the db file with this one and recompile.
http://www.computerntelecom.com/pub/zmschema.sql.z

Regards,
Cordel

[Edit] heres the patch

Code: Select all

--- 	zmschema.sql.z.orig 2005-11-07 04:03:21.000000000 -0800
+++ zm-1.21.4/db/zmschema.sql.z	2005-11-14 12:34:01.000000000 -0800
@@ -374,9 +374,9 @@
 
 --
 -- Create a default admin user.
 --
-insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit',NULL);
+insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','High',NULL);
 --
 -- Add in a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
 --
 insert into Filters values ('PurgeWhenFull','trms=2&obr1=&cbr1=&attr1=Archived&op1==&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=95&sort_field=Id&sort_asc=1&limit=5',0,0,0,0,0,'');

new error

Posted: Mon Nov 14, 2005 8:46 pm
by germandms
now have other error

ERROR 1048 (23000) at line 378: Column 'MonitorIds' cannot be null

thank you cordel

Posted: Mon Nov 14, 2005 8:58 pm
by cordel
Okay this may sound funney but I don't know why. On my database MonitorID colum alows NULLs as it should. If you put values here then this would restrict the admin to the monitorID placed here. :oops:

Unless....
New patch and I reuped the file to the server with the changes. you'll need to drop the database.

Code: Select all

--- zm-1.21.4/db/zmschema.sql.z.orig	2005-11-07 04:03:21.000000000 -0800
+++ zm-1.21.4/db/zmschema.sql.z	2005-11-14 12:57:08.000000000 -0800
@@ -333,9 +333,9 @@
   Control enum('None','View','Edit') NOT NULL default 'None',
   Monitors enum('None','View','Edit') NOT NULL default 'None',
   System enum('None','View','Edit') NOT NULL default 'None',
   MaxBandwidth varchar(16) NOT NULL default '',
-  MonitorIds tinytext NOT NULL,
+  MonitorIds tinytext default NULL,
   PRIMARY KEY  (Id),
   UNIQUE KEY UC_Id (Id),
   UNIQUE KEY UC_Username (Username)
 ) TYPE=MyISAM;
@@ -374,9 +374,9 @@
 
 --
 -- Create a default admin user.
 --
-insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit',NULL);
+insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','High',NULL);
 --
 -- Add in a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
 --
 insert into Filters values ('PurgeWhenFull','trms=2&obr1=&cbr1=&attr1=Archived&op1==&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=95&sort_field=Id&sort_asc=1&limit=5',0,0,0,0,0,'');

Posted: Mon Nov 14, 2005 9:20 pm
by cordel
Also please let me know if this works out 8)
Regards,
Cordel

I work the compilation

Posted: Tue Nov 15, 2005 1:16 pm
by germandms
I work the compilation
the data base that I create volume the name of ZM_DB_NAME


chkconfig --add zm
zm: unknown service
zm: not a runlevel service

when I enter http://localhost/zm

Fatal error: Call to undefined function: session_start() in /srv/www/htdocs/zm/zm.php on line 159

my file zm.php

session_start();

if ( !$_SESSION['format'] )
{
$_SESSION['format'] = $format;
$_SESSION['cookies'] = $cookies;
$_SESSION['device'] = $device;
if ( $cookies )
{
setcookie( "format", $format );
setcookie( "cookies", $cookies );
}
}

require_once( "zm_$format.php" );

MORE

Posted: Tue Nov 15, 2005 1:19 pm
by germandms
The compilations the I did with
mysql < zmschema.sql.z -p

thank you

Posted: Fri Jan 06, 2006 2:22 pm
by furbitso
Cordel,

I can confirm that the second patch you posted installs with no errors. I am using zm-1.21.4 with mysql-server-4.0.24-10ubuntu2.

Would be great if you could update the link to reflect the newest patch.

Thanks,

Paul

Posted: Fri Jan 06, 2006 8:31 pm
by cordel
I belive if you check the zm-1.21.4 you downloaded, the patch should already be there now and not required.

Corey