PATCH: mysql_setpermission

PATCH: mysql_setpermission

am 13.12.2002 14:41:41 von mmokrejs

Hi,
I've updated a bit the terrible script distributed with mysql. ;)
The update now states more precisely what kind of privileges user will
get, uses GRANT command and does not stupidly insert rows and set just
some fields. This means the script will always work up-to-date with
current mysql expectations.

There's a new option to revoke privileges etc. Maybe you want to update
the version number in the file from 1.2 to something else, but I don't care
much about this. Better I've removed few more global variables. Probably
some still remain, but the code seems to be more usable to me right now. ;)


http://pedant.gsf.de/mysql_setpermission.patch


How-To-Repeat:

############################################################ ##########
## Welcome to the permission setter 1.2 for MySQL.
## made by Luuk de Boer
############################################################ ##########
What would you like to do:
1. Set password for an existing user.
2. Create a database + user privilege from that database and host combination.
- user can do only SELECT
3. Create/append user privilege for an existing database and host combination.
- user can do only SELECT
4. Create/append broader user privilege for an existing database and host combination.
- user can do SELECT,INSERT,UPDATE,DELETE
5. Create/append quite extended user privilege for an existing database and host combination.
- user can do SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
6. Create/append quite database administrative privilege for an existing database and host combination.
- user can do GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES,SHOW DATABASES,PROCESS
7. Create/append full privilege for an existing database and host combination.
- user has FULL privilege
8. Remove all privileges for for an existing database and host combination.
- user will have all permission fields set to N
0. exit this program

Make your choice [1,2,3,4,5,6,7,0]:



--
Martin Mokrejs ,
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585



------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13270@lists.mysql.com
To unsubscribe, e-mail