2003-07-22 22:00:51 +02:00
|
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
|
|
flush privileges;
|
|
|
|
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
|
|
|
|
select current_user();
|
|
|
|
current_user()
|
|
|
|
mysqltest_1@localhost
|
2004-04-05 14:55:26 +02:00
|
|
|
select current_user;
|
|
|
|
current_user
|
|
|
|
mysqltest_1@localhost
|
2003-07-22 22:21:23 +02:00
|
|
|
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
|
|
|
|
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
|
2004-06-16 05:18:20 +02:00
|
|
|
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%'
|
2003-07-22 22:21:23 +02:00
|
|
|
show grants for mysqltest_1@localhost;
|
|
|
|
Grants for mysqltest_1@localhost
|
|
|
|
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
|
|
|
GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
|
|
|
|
show grants for mysqltest_2@localhost;
|
|
|
|
Grants for mysqltest_2@localhost
|
|
|
|
GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost'
|
|
|
|
GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION
|
2003-07-22 22:00:51 +02:00
|
|
|
show grants for mysqltest_3@localhost;
|
2003-07-22 22:21:23 +02:00
|
|
|
ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost'
|
2003-07-22 22:00:51 +02:00
|
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
|
|
flush privileges;
|