侧边栏壁纸
  • 累计撰写 78 篇文章
  • 累计创建 37 个标签
  • 累计收到 8 条评论

目 录CONTENT

文章目录

Splunk Mysql add-on 通过SQL采集数据库性能查询到的表

散漫的老何
2021-03-31 / 0 评论 / 0 点赞 / 499 阅读 / 6,589 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2021-07-09,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

information_schema库

information_schema.GLOBAL_STATUS
information_schema.session_variables
information_schema.tables
information_schema.tables
information_schema.routines
information_schema.triggers
information_schema.events
information_schema.innodb_buffer_page
information_schema.innodb_buffer_page
information_schema.innodb_buffer_page
information_schema.innodb_trx
information_schema.innodb_locks
information_schema.innodb_lock_waits
information_schema.TABLES
information_schema.global_status
information_schema.innodb_metrics
information_schema.global_status
information_schema.global_status
information_schema.global_status
information_schema.innodb_metrics
information_schema.global_status
information_schema.global_variables
information_schema.global_status

performance_schema库

performance_schema.events_waits_summary_by_thread_by_event_name
performance_schema.threads
performance_schema.file_summary_by_instance
performance_schema.file_summary_by_event_name
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.events_statements_summary_by_digest
performance_schema.events_statements_summary_by_digest stmts
performance_schema.events_waits_summary_by_user_by_event_name
performance_schema.events_statements_summary_by_user_by_event_name
performance_schema.events_waits_summary_by_host_by_event_name
performance_schema.events_statements_summary_by_host_by_event_name
performance_schema.accounts
performance_schema.events_waits_summary_global_by_event_name
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.accounts
performance_schema.events_statements_summary_by_user_by_event_name
performance_schema.events_stages_summary_by_host_by_event_name
performance_schema.threads
performance_schema.events_waits_current
performance_schema.events_statements_current

Mysql库

mysql.general_log
mysql.user

其他表

slow_log

相关命令

SHOW databases
SHOW SLAVE STATUS
SHOW ENGINE INNODB STATUS
SHOW FULL PROCESSLIST
SHOW GRANTS
SHOW ERRORS
SHOW WARNINGS

授权SQL

//information_schema库
grant select on information_schema.GLOBAL_STATUS to 'username'@'%';
grant select on information_schema.session_variablesto 'username'@'%';
grant select on information_schema.tables to 'username'@'%';
grant select on information_schema.tables to 'username'@'%';
grant select on information_schema.routines to 'username'@'%';
grant select on information_schema.triggers to 'username'@'%';
grant select on information_schema.events to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_trx to 'username'@'%';
grant select on information_schema.innodb_locks to 'username'@'%';
grant select on information_schema.innodb_lock_waitsto 'username'@'%';
grant select on information_schema.TABLES to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.innodb_metrics to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.innodb_metrics to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_variables to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';

//performance_schema库
grant select on performance_schema.events_waits_summary_by_thread_by_event_name to 'username'@'%';
grant select on performance_schema.threads to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.file_summary_by_event_nameto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.events_statements_summary_by_digest to 'username'@'%';
grant select on performance_schema.events_statements_summary_by_digest stmts to 'username'@'%';
grant select on performance_schema.events_waits_summary_by_user_by_event_nameto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_user_by_event_name to 'username'@'%';
grant select on performance_schema.events_waits_summary_by_host_by_event_nameto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_host_by_event_name to 'username'@'%';
grant select on performance_schema.accountsto 'username'@'%';
grant select on performance_schema.events_waits_summary_global_by_event_name to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.accountsto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_user_by_event_name to 'username'@'%';
grant select on performance_schema.events_stages_summary_by_host_by_event_name to 'username'@'%';
grant select on performance_schema.threads to 'username'@'%';
grant select on performance_schema.events_waits_currentto 'username'@'%';
grant select on performance_schema.events_statements_current to 'username'@'%';
grant select on slow_log to 'username'@'%';

//mysql库
grant select on mysql.general_log to 'username'@'%';
grant select on mysql.user to 'username'@'%';

//相关查询命令
SHOW databases;
SHOW SLAVE STATUS;
SHOW ENGINE INNODB STATUS;
SHOW FULL PROCESSLIST;
SHOW GRANTS;
SHOW ERRORS;
SHOW WARNINGS;

0
广告 广告

评论区