head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	2001.08.03.18.34.47;	author leonardr;	state Exp;
branches;
next	1.4;

1.4
date	2001.04.19.18.18.02;	author leonardr;	state Exp;
branches;
next	1.3;

1.3
date	2001.04.19.02.41.35;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2001.04.13.22.33.30;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.04.13.18.11.04;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Configuration settings for read-only database access.
@
text
@#!/usr/bin/perl -w

my $DATABASE_NAME = shift(@@ARGV);
my $DATABASE_USER = shift(@@ARGV);
my $DATABASE_PASSWORD = shift(@@ARGV);
my $READ_ONLY_DATABASE_USER = shift(@@ARGV);
my $READ_ONLY_DATABASE_PASSWORD = shift(@@ARGV);
my @@HOSTS = @@ARGV;

foreach my $host (@@HOSTS)
{
   print "grant all privileges on $DATABASE_NAME.* to $DATABASE_USER\@@$host " .
     "identified by '$DATABASE_PASSWORD';\n";

   print "grant select on $DATABASE_NAME.* to $READ_ONLY_DATABASE_USER@@$host identified by '$READ_ONLY_DATABASE_PASSWORD';\n";

}
@


1.4
log
@Reverting old commit.
@
text
@d6 2
d14 3
@


1.3
log
@Give access to the mysql database as well.
@
text
@a11 2
   print "grant all privileges on mysql.* to $DATABASE_USER\@@$host " .
     "identified by '$DATABASE_PASSWORD';\n";
@


1.2
log
@* Added -w.

* Cleaned up foreach.
@
text
@d12 2
@


1.1
log
@More clustering complications.
@
text
@d1 1
a1 1
#!/usr/bin/perl
d8 1
a8 1
foreach $host (@@HOSTS)
d10 3
a12 2
 print "grant all privileges on $DATABASE_NAME.* to $DATABASE_USER\@@$host identified by '$DATABASE_PASSWORD';\n";
}@

