技术开发 频道

浅谈MySQL数据库优化

1.2 MYSQL服务器状态变量


mysqladmin查看服务器状态变量(动态变化):

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqladmin -uroot -p extended-status Enter password: ****** +-----------------------------------+----------+ | Variable_name | Value | +-----------------------------------+----------+ | Aborted_clients | 0 | | Aborted_connects | 3 | | Binlog_cache_disk_use | 0 | | Binlog_cache_use | 0 | | Bytes_received | 2664 | | Bytes_sent | 96723 | | Com_admin_commands | 0 | | Com_alter_db | 0 | | Com_alter_table | 0 | | Com_analyze | 0 |
该命令和下面命令等效:
//获得MYSQL服务器的统计和状态指标 mysql> show status; +-----------------------------------+----------+ | Variable_name | Value | +-----------------------------------+----------+ | Aborted_clients | 0 | | Aborted_connects | 3 | | Binlog_cache_disk_use | 0 | | Binlog_cache_use | 0 | | Bytes_received | 765 | | Bytes_sent | 80349 | | Com_admin_commands | 0 | | Com_alter_db | 0 | | Com_alter_table | 0 | | Com_analyze | 0 | //刷新MYSQL服务器状态变量 mysql> show status like 'Bytes_sent%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Bytes_sent | 53052 | +---------------+-------+ 1 row in set (0.00 sec) mysql> flush status; Query OK, 0 rows affected (0.00 sec) mysql> show status like 'Bytes_sent%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Bytes_sent | 11 | +---------------+-------+ 1 row in set (0.00 sec)

0
相关文章