mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
e0e0f9e3d4
Part V: performance schema implementation
27 lines
1.6 KiB
Text
27 lines
1.6 KiB
Text
show grants;
|
|
Grants for root@localhost
|
|
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
|
|
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
|
|
grant SELECT(thread_id, event_id) on performance_schema.EVENTS_WAITS_CURRENT
|
|
to 'pfs_user_5'@localhost;
|
|
grant UPDATE(enabled) on performance_schema.SETUP_INSTRUMENTS
|
|
to 'pfs_user_5'@localhost;
|
|
flush privileges;
|
|
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'
|
|
select thread_id, event_id, 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'
|
|
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'
|
|
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
|
|
DROP USER 'pfs_user_5'@localhost;
|
|
flush privileges;
|
|
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
|
|
UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
|
|
UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
|