mysql 性能调优2

1、Show Global Status , Show global variables ,Show full processlist
      得到Mysql数据库系统当前各种系统变量和状态 ,并且各种监控工具几乎都是对这三个指令的输出进行数据的计算和统计分析

   mysqladmin -uroot -p extended-status ,mysqladmin -uroot -p extended-variables,mysqladmin -uroot -p extended-processlist


mysql> show global variables;
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| Variable_name                           | Value                                                                                     |
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| auto_increment_increment                | 1                                                                                         |
| auto_increment_offset                   | 1                                                                                         |
| autocommit                              | ON                                                                                        |
| automatic_sp_privileges                 | ON                                                                                        |
| back_log                                | 50                                                                                        |
| basedir                                 | /usr/                                                                                     |
| big_tables                              | OFF                                                                                       |

 

mysql> show global status;
+-----------------------------------+------------+
| Variable_name                     | Value      |
+-----------------------------------+------------+
| Aborted_clients                   | 19         |
| Aborted_connects                  | 2          |
| Binlog_cache_disk_use             | 0          |
| Binlog_cache_use                  | 0          |
| Bytes_received                    | 399630956  |
| Bytes_sent                        | 41885453   |

 

mysql> show full processlist;
+------+------+------------------+-------------+---------+------+-------+-----------------------+
| Id   | User | Host             | db          | Command | Time | State | Info                  |
+------+------+------------------+-------------+---------+------+-------+-----------------------+
| 7263 | root | 10.50.11.23:4339 | NULL        | Sleep   | 1762 |       | NULL                  |
| 7264 | root | 10.50.11.23:4341 | wordtraffic | Sleep   | 1758 |       | NULL                  |
| 7356 | root | localhost        | NULL        | Query   |    0 | NULL  | show full processlist |
+------+------+------------------+-------------+---------+------+-------+-----------------------+

 

2、mysqladmin -u-p -i 10 extended status;

每隔10秒记录一下状态

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值