mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
24 lines
1 KiB
Text
24 lines
1 KiB
Text
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
|
|
grant all privileges on `my\_1`.* to mysqltest_9@localhost with grant option;
|
|
ERROR 42000: Access denied for user: 'mysqltest_1@localhost' to database 'my\_1'
|
|
grant all privileges on `my_%`.* to mysqltest_2@localhost with grant option;
|
|
select current_user();
|
|
current_user()
|
|
mysqltest_2@localhost
|
|
grant all privileges on `mysql`.* to mysqltest_3@localhost with grant option;
|
|
select current_user();
|
|
current_user()
|
|
mysqltest_3@localhost
|
|
show grants for mysqltest_3@localhost;
|
|
Grants for mysqltest_3@localhost
|
|
GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
|
|
GRANT ALL PRIVILEGES ON `mysql`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
flush privileges;
|