Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] MySQL and Grouper

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] MySQL and Grouper


Chronological Thread 
  • From: "Michael R. Gettes" <>
  • To: Grouper-Users <>
  • Subject: Re: [grouper-users] MySQL and Grouper
  • Date: Sun, 16 Sep 2007 16:08:21 -0400

What I learned from MySQL (5.0[.22]) and grouper 1.2.0

ant schemaexport generates invalid DDL.

grouper_attributes definition was changed from

create table grouper_attributes (
id varchar(128) not null,
group_id varchar(128),
field_name varchar(32) not null,
value text not null,
primary key (id),
unique (group_id, field_name, value)
);

to

create table grouper_attributes (
id varchar(128) not null,
group_id varchar(128),
field_name varchar(32) not null,
value varchar(840) not null,
primary key (id),
unique (group_id, field_name, value)
);

(only definition of 'value' changed)

given this - somewhat as cal notes - db-init won't work since it
calls schema-export (which it really shouldn't given the instructions).
i modified db-init (in build.xml) to not depend on schema-export and then
ran db-init to properly initialize the table. Then things could proceed.
db-init did NOT depend on schema-export in the previous version of grouper.
(i checked!)

I am now successfully (apparently) using MySQL 5.0 and grouper 1.2.0
I have created priv'd users and creates group stems/members....

/mrg

On Sep 15, 2007, at 8:03, caleb racey wrote:

Hi michael we are currently using grouper with mysql 5

it mostly works with the exception that the table "grouper_attributes" doesn't get created becuase hibernate tries to create something mysql5 is not happy with. The long term solution would be an upgrade to the latest hibernate which has a mysql5 dialect, but that would be non trivial.

A work around is to manualy create the table then it will work fine, something like the sql below will do it. Be warned though most of the build process likes to empty out the database and recreat the tables so you can loose the table several times. I've taken to keeping a copy of the table called grouper_attribute_copy and copying it back to grouper_attributes whenever the build process stomps on the origional

mysql5 compatable grouper attributes creation sql:

CREATE TABLE IF NOT EXISTS `grouper_attributes` (
`id` varchar(128) NOT NULL,
`group_id` varchar(128) default NULL,
`field_name` varchar(32) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `group_id` (`group_id`,`field_name`,`value`(255)),
KEY `attribute_value_idx` (`value`(255)),
KEY `attribute_group_idx` (`group_id`),
KEY `attribute_field_idx` (`field_name`)
) ENGINE=MyISAM DEFAULT;

One day i might get round to seeing if an innodb table type improves performance but for now MyISAM in acceptible (performace experience email to follow once we've done some more testing)

hope this helps

Cal

Caleb Racey
GFIVO project
Webteam
ISS
Newcastle University

________________________________

From: Michael R. Gettes
[mailto:]
Sent: Fri 9/14/2007 7:49 PM
To: Grouper-Users
Subject: [grouper-users] MySQL and Grouper



Has anyone gotten Grouper and MySQL (5+) to work together? If so,
please let me know?

Thanks

/mrg







Archive powered by MHonArc 2.6.16.

Top of Page