~darrencassar/crib/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
INSTALLATION:

Grant the following privileges on their respective instances:

        Remember to set good passwords for both user types

	CRIB main instance:
	grant create, insert, alter, update, delete, select, drop, execute, create temporary tables, creat routine, alter routine, lock tables on crib.* to "mother"@"%" identified by "teacher";

	CLIENT instance:
	grant create, alter, insert, delete, select, drop, lock tables on crib_client.* to "child"@"%" identified by "pupil";
	grant select on mysql.user TO 'child'@'%';
	grant select on *.* to 'child'@'%';


Installation can happen in two ways:

  EITHER

	cd INSTALL
	./crib_install.sh

	follow the instructions asking for passwords

  OR

	setup INSTALL/crib.sql on the destination
	setup INSTALL/crib_reporting.sql on the destination
	setup INSTALL/info_user_privileges.sql on the destination

	setup the below on the source:

	drop database crib_client; 
	create database crib_client;

	CREATE TABLE crib_client.object_list (
	    instance_id int(10) unsigned NOT NULL,
	    db_name varchar(64) NOT NULL,
	    tb_sp_name varchar(64) NOT NULL,
	    type char(1) NOT NULL
	) ENGINE=InnoDB DEFAULT CHARSET=latin1;

	CREATE TABLE crib_client.users_list (
	    instance_id int(10) unsigned NOT NULL,
	    username varchar(16)  NOT NULL,
	    hostname varchar(60) NOT NULL,
	    password char(41) CHARACTER SET latin1 NOT NULL
	) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;

	CREATE TABLE crib_client.user_privilege_list (
	    grantee varchar(80) NOT NULL,
	    table_schema varchar(64) NOT NULL,
	    privileges text
	) ENGINE=MyISAM DEFAULT CHARSET=latin1;