看DB参数和数据用:show status;
>>show tables from information_schema;
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEY_COLUMN_USAGE |
| OPTIMIZER_TRACE |
| 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_CMP_RESET |
| INNODB_FT_CONFIG |
| INNODB_SYS_DATAFILES |
| INNODB_TRX |
| INNODB_SYS_TABLESTATS |
| ndb_transid_mysql_connection_map |
| INNODB_FT_BEING_DELETED |
| INNODB_LOCKS |
| INNODB_CMP_PER_INDEX |
| INNODB_BUFFER_PAGE_LRU |
| INNODB_FT_DELETED |
| INNODB_CMPMEM_RESET |
| INNODB_LOCK_WAITS |
| INNODB_CMP |
| INNODB_SYS_INDEXES |
| INNODB_SYS_TABLES |
| INNODB_SYS_FIELDS |
| INNODB_CMP_PER_INDEX_RESET |
| INNODB_BUFFER_PAGE |
| INNODB_FT_DEFAULT_STOPWORD |
| INNODB_FT_INDEX_TABLE |
| INNODB_FT_INDEX_CACHE |
| INNODB_SYS_TABLESPACES |
| INNODB_METRICS |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_CMPMEM |
| INNODB_BUFFER_POOL_STATS |
| INNODB_SYS_COLUMNS |
| INNODB_SYS_FOREIGN |
+---------------------------------------+
MySQL>> show create table ossOperationType;
| Table | Create Table |
+---------------------------------------------
| ossOperationType | CREATE TABLE `ossOperationType` (
`ossOperationTypeId` binary(1) NOT NULL,
`ssInThePLMNId` binary(2) NOT NULL,
`mobileNetworkCodeId` binary(3) NOT NULL,
`mobileCountryCodeId` binary(3) NOT NULL,
`stringIA5` binary(17) DEFAULT NULL,
`stringUssd` binary(17) DEFAULT NULL,
`stringUcs2` binary(17) DEFAULT NULL,
`ossOperationTypeTime` bigint(20) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
PRIMARY KEY (`ossOperationTypeId`,`ssInThePLMNId`,`mobileNetworkCodeId`,`mobileCountryCodeId`) USING HASH
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 COLLATE=latin1_bin
/*!50100 PARTITION BY KEY (ossOperationTypeId) */ |
+---------------------+
1 row in set (0.01 sec)
mysql> show status;
...
.....
mysql> show processlist;
+------+-------------+-----------------+------+---------+--------+-----------------------------------------------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+-------------+-----------------+------+---------+--------+-----------------------------------------------------------------------------+------------------+
| 1 | system user | | | Daemon | 1 | Waiting for event from ndbcluster | NULL |
| 2 | dbsup | STATION_A:59079 | NULL | Sleep | 1 | | NULL |
| 3 | system user | | NULL | Connect | 490535 | Waiting for master to send event | NULL |
| 4 | system user | | NULL | Connect | 1 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL |
| 9721 | admin | localhost | hlr | Query | 0 | init | show processlist |
+------+-------------+-----------------+------+---------+--------+-----------------------------------------------------------------------------+------------------+
5 rows in set (0.00 sec)
看存储引擎参数:
mysql> show engine innodb status\G;
*************************** 1. row ***************************No query specified
mysql> show engine ndbcluster status\G;
*************************** 1. row ***************************
Type: ndbcluster
Name: connection
Status: cluster_node_id=116, connected_host=STATION_A, connected_port=2200, number_of_data_nodes=14, number_of_ready_data_nodes=14, connect_count=0
*************************** 2. row ***************************
Type: ndbcluster
Name: NdbTransaction
Status: created=14, free=14, sizeof=368
*************************** 3. row ***************************
Type: ndbcluster
Name: NdbOperation
Status: created=28, free=28, sizeof=944
*************************** 4. row ***************************
Type: ndbcluster
Name: NdbIndexScanOperation
Status: created=0, free=0, sizeof=1152
*************************** 5. row ***************************
Type: ndbcluster
Name: NdbIndexOperation
Status: created=0, free=0, sizeof=952
*************************** 6. row ***************************
Type: ndbcluster
Name: NdbRecAttr
Status: created=0, free=0, sizeof=88
*************************** 7. row ***************************
Type: ndbcluster
Name: NdbApiSignal
Status: created=16, free=16, sizeof=144
*************************** 8. row ***************************
Type: ndbcluster
Name: NdbLabel
Status: created=0, free=0, sizeof=200
*************************** 9. row ***************************
Type: ndbcluster
Name: NdbBranch
Status: created=0, free=0, sizeof=32
*************************** 10. row ***************************
Type: ndbcluster
Name: NdbSubroutine
Status: created=0, free=0, sizeof=72
*************************** 11. row ***************************
Type: ndbcluster
Name: NdbCall
Status: created=0, free=0, sizeof=24
*************************** 12. row ***************************
Type: ndbcluster
Name: NdbBlob
Status: created=0, free=0, sizeof=496
*************************** 13. row ***************************
Type: ndbcluster
Name: NdbReceiver
Status: created=0, free=0, sizeof=128
*************************** 14. row ***************************
Type: ndbcluster
Name: NdbLockHandle
Status: created=0, free=0, sizeof=48
*************************** 15. row ***************************
Type: ndbcluster
Name: binlog
Status: latest_epoch=2005758317166600, latest_trans_epoch=2005758317166596, latest_received_binlog_epoch=2005758317166600, latest_handled_binlog_epoch=2005758317166600, latest_applied_binlog_epoch=2005758317166596
15 rows in set (0.00 sec)
ERROR:
No query specified