MYSQL Show engine and other practical command

Source: Internet
Author: User
Tags mutex rounds

See DB parameters and data by: 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                               &NBS P                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                                              ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                                 &NBSP                          ,         &NB Sp                        |
+---------------------------------------------
| 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 (+) DEFAULT NULL,
' STRINGUSSD ' binary (+) DEFAULT NULL,
' STRINGUCS2 ' binary (+) DEFAULT NULL,
' Ossoperationtypetime ' bigint ()/*!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 have 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)


Look at the storage engine parameters:

Mysql> show engine InnoDB status\g;

1. Row ***************************
Type:innodb
Name:
Status:
=====================================
2016-05-06 14:12:46 7f406e04c700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last seconds
-----------------
BACKGROUND THREAD
-----------------
Srv_master_thread loops:1 srv_active, 0 srv_shutdown, 488673 srv_idle
Srv_master_thread Log Flush and writes:488674
----------
Semaphores
----------
OS WAIT ARRAY info:reservation count 2
OS WAIT ARRAY info:signal count 2
Mutex Spin waits 0, rounds 0, OS waits 0
Rw-shared spins 2, rounds, OS waits 2
Rw-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait:0.00 mutex, 30.00 rw-shared, 0.00 RW-EXCL
------------
Transactions
------------
Trx ID Counter 5381
Purge done for Trx's N:o < 0 undo N:o < 0 state:running but idle
History list Length 0
LIST of transactions for each SESSION:
---TRANSACTION 0, not started
MySQL thread ID 9721, OS thread handle 0x7f406e04c700, query ID 7570041 localhost admin init
Show Engine InnoDB Status
--------
FILE I/O
--------
I/O thread 0 state:waiting for I/O request (insert buffer thread)
I/O thread 1 state:waiting for I/O request (log thread)
I/O thread 2 state:waiting for I/O request (read thread)
I/O thread 3 state:waiting for I/O request (read thread)
I/O thread 4 state:waiting for I/O request (read thread)
I/O thread 5 state:waiting for I/O request (read thread)
I/O thread 6 state:waiting for I/O request (write thread)
I/O thread 7 state:waiting for I/O request (write thread)
I/O thread 8 state:waiting for I/O request (write thread)
I/O thread 9 state:waiting for I/O request (write thread)
Pending normal AIO reads:0 [0, 0, 0, 0], Aio writes:0 [0, 0, 0, 0],
Ibuf Aio reads:0, log I/O ' s:0, sync I/O ' s:0
Pending Flushes (fsync) log:0; Buffer pool:0
318 OS file reads, 5 OS file writes, 5 OS Fsyncs
0.00 READS/S, 0 avg bytes/read, 0.00 WRITES/S, 0.00 FSYNCS/S
-------------------------------------
INSERT BUFFER and ADAPTIVE HASH INDEX
-------------------------------------
Ibuf:size 1, free list len 0, seg size 2, 0 merges
Merged operations:
Insert 0, delete mark 0, delete 0
Discarded operations:
Insert 0, delete mark 0, delete 0
Hash table Size 276707, node heap has 0 buffer (s)
0.00 Hash SEARCHES/S, 0.00 Non-hash SEARCHES/S
---
LOG
---
Log Sequence Number 1626067
Log flushed up to 1626067
Pages flushed up to 1626067
Last checkpoint at 1626067
0 Pending Log writes, 0 pending CHKP writes
8 Log I/O ' s done, 0.00 log I/O ' S/second
----------------------
BUFFER POOL and MEMORY
----------------------
Total memory Allocated 137363456; In additional pool allocated 0
Dictionary Memory Allocated 59957
Buffer Pool Size 8192
Free Buffers 8023
Database pages 169
Old database pages 0
Modified db pages 0
Pending reads 0
Pending WRITES:LRU 0, flush list 0, single page 0
Pages made young 0, isn't young 0
0.00 YOUNGS/S, 0.00 NON-YOUNGS/S
Pages Read 169, created 0, written 1
0.00 READS/S, 0.00 CREATES/S, 0.00 WRITES/S
No Buffer Pool page gets since the last printout
Pages Read ahead 0.00/s, evicted without access 0.00/s, Random read Ahead 0.00/s
LRU len:169, Unzip_lru len:0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 Read views open inside InnoDB
Main thread Process No. 479821, id 139913752205056, state:sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 INSERTS/S, 0.00 UPDATES/S, 0.00 DELETES/S, 0.00 READS/S
----------------------------
END of INNODB MONITOR OUTPUT
============================


1 row in Set (0.00 sec)


ERROR:

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
Rows in Set (0.00 sec)


ERROR:
No query specified

MYSQL Show engine and other practical command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.