查看mysql数据库表状态_MySQL库表状态查询

一. 查看库的各链接状态

对于一个mysql连接或者一个线程,任何时刻都有一个状态,表示其当前正在做什么。一般使用show full processlist查看。

8f900a89c6347c561fdf2122f13be562.png

961ddebeb323a10fe0623af514929fc1.png

+---------+-------------+-------------------+------+---------+------+-------+-----------------------+

| Id | User | Host | db | Command | Time | State | Info |

+---------+-------------+-------------------+------+---------+------+-------+-----------------------+

| 2547225 | operator@RR | 10.3.18.205:60253 | fb | Query | 0 | NULL | show full processlist |

| 2548100 | operator@RR | 10.4.19.83:51754 | fb | Sleep | 1 | | NULL |

| 2548101 | operator@RR | 10.4.19.83:53661 | fb | Sleep | 1 | | NULL |

| 2548102 | operator@RR | 10.4.19.83:45808 | fb | Sleep | 1 | | NULL |

| 2548103 | operator@RR | 10.4.19.83:58881 | fb | Sleep | 1 | | NULL |

| 2548104 | operator@RR | 10.4.19.83:33521 | fb | Sleep | 1 | | NULL |

+---------+-------------+-------------------+------+---------+------+-------+-----------------------+

show full processlist

二. 查看存储引擎

2.1 查看当前库支持的存储引擎

保存在information_schema.ENGINES表里。

SHOW ENGINES

8f900a89c6347c561fdf2122f13be562.png

961ddebeb323a10fe0623af514929fc1.png

+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+

| Engine | Support | Comment | Transactions | XA | Savepoints |

+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+

| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |

| CSV | YES | CSV storage engine | NO | NO | NO |

| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |

| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |

| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |

| MyISAM | YES | MyISAM storage engine | NO | NO | NO |

| ARCHIVE | YES | Archive storage engine | NO | NO | NO |

| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES |

| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |

+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+

结果

2.2 查看某存储引擎的状态

SHOW ENGINE INNODB STATUS

8f900a89c6347c561fdf2122f13be562.png

961ddebeb323a10fe0623af514929fc1.png

=====================================

2016-01-15 10:12:44 7f4a4c4b6700 INNODB MONITOR OUTPUT

================

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值