2010-01-11 18:47:27 -07:00
|
|
|
show grants;
|
|
|
|
Grants for root@localhost
|
|
|
|
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
|
2013-10-18 11:38:13 -07:00
|
|
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
2015-08-11 18:45:38 +02:00
|
|
|
create user 'pfs_user_5'@localhost;
|
2010-01-11 18:47:27 -07:00
|
|
|
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
|
2010-11-03 16:42:33 +01:00
|
|
|
grant SELECT(thread_id, event_id) on performance_schema.events_waits_current
|
2010-01-11 18:47:27 -07:00
|
|
|
to 'pfs_user_5'@localhost;
|
2010-11-03 16:42:33 +01:00
|
|
|
grant UPDATE(enabled) on performance_schema.setup_instruments
|
2010-01-11 18:47:27 -07:00
|
|
|
to 'pfs_user_5'@localhost;
|
|
|
|
flush privileges;
|
2010-11-03 16:42:33 +01:00
|
|
|
select thread_id from performance_schema.events_waits_current;
|
|
|
|
select thread_id, event_id from performance_schema.events_waits_current;
|
|
|
|
update performance_schema.setup_instruments set enabled='YES';
|
|
|
|
select event_name from performance_schema.events_waits_current;
|
|
|
|
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current'
|
2010-01-11 18:47:27 -07:00
|
|
|
select thread_id, event_id, event_name
|
2010-11-03 16:42:33 +01:00
|
|
|
from performance_schema.events_waits_current;
|
|
|
|
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current'
|
|
|
|
update performance_schema.setup_instruments set name='illegal';
|
|
|
|
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'setup_instruments'
|
|
|
|
update performance_schema.setup_instruments set timed='NO';
|
|
|
|
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'setup_instruments'
|
2010-01-11 18:47:27 -07:00
|
|
|
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
|
|
|
|
DROP USER 'pfs_user_5'@localhost;
|
|
|
|
flush privileges;
|
2010-11-03 16:42:33 +01:00
|
|
|
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
|