| 1 |
show grants; |
| 2 |
Grants for root@localhost |
| 3 |
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| 4 |
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
| 5 |
create user 'pfs_user_5'@localhost; |
| 6 |
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION; |
| 7 |
grant SELECT(thread_id, event_id) on performance_schema.events_waits_current |
| 8 |
to 'pfs_user_5'@localhost; |
| 9 |
grant UPDATE(enabled) on performance_schema.setup_instruments |
| 10 |
to 'pfs_user_5'@localhost; |
| 11 |
flush privileges; |
| 12 |
connect con1, localhost, pfs_user_5, , ; |
| 13 |
select thread_id from performance_schema.events_waits_current; |
| 14 |
select thread_id, event_id from performance_schema.events_waits_current; |
| 15 |
update performance_schema.setup_instruments set enabled='YES'; |
| 16 |
select event_name from performance_schema.events_waits_current; |
| 17 |
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current' |
| 18 |
select thread_id, event_id, event_name |
| 19 |
from performance_schema.events_waits_current; |
| 20 |
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current' |
| 21 |
update performance_schema.setup_instruments set name='illegal'; |
| 22 |
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'setup_instruments' |
| 23 |
update performance_schema.setup_instruments set timed='NO'; |
| 24 |
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'setup_instruments' |
| 25 |
connection default; |
| 26 |
disconnect con1; |
| 27 |
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost; |
| 28 |
DROP USER 'pfs_user_5'@localhost; |
| 29 |
flush privileges; |
| 30 |
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES'; |