information_schema模式表介紹processlist 在mysql裡,我們一般通過show (full)processlist查看當前連接情況,處理各種數據庫問題。現在在information_schema模式下,5.5以後增加了processlist表,裡面存儲了當前連接信息,跟show (full) processlist存儲的一樣。通過processlist 我們可以統計分析一些信息,而不依賴於shell命令(如 grep、awk等) 如 查詢當前ip的連接信息 mysql> select substring_index(host,':',1),count(*) from processlist group by substring_index(host,':',1); 同時,還增加了對innodb存儲引擎性能信息等相關表,如下以innodb開頭的表 mysql> select database(); +--------------------+ | database() | +--------------------+ | information_schema | +--------------------+ 1 row in set (0.00 sec) mysql> show tables; +---------------------------------------+ | Tables_in_information_schema | +---------------------------------------+ | CHARACTER_SETS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | | PLUGINS | | PROCESSLIST | | PROFILING | | REFERENTIAL_CONSTRAINTS | | ROUTINES | | SCHEMATA | | SCHEMA_PRIVILEGES | | SESSION_STATUS | | SESSION_VARIABLES | | STATISTICS | | TABLES | | TABLESPACES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | | INNODB_BUFFER_PAGE | | INNODB_TRX | | INNODB_BUFFER_POOL_STATS | | INNODB_LOCK_WAITS | | INNODB_CMPMEM | | INNODB_CMP | | INNODB_LOCKS | | INNODB_CMPMEM_RESET | | INNODB_CMP_RESET | | INNODB_BUFFER_PAGE_LRU | +---------------------------------------+ 40 rows in set (0.01 sec)