浅谈MySQL数据库优化
2007-11-11 13:22:01 来源:WEB开发网核心提示: 1.2 MySQL(和PHP搭配之最佳组合)服务器状态变量 MySQL(和PHP搭配之最佳组合)admin查看服务器状态变量(动态变化): C:\Program Files\MySQL(和PHP搭配之最佳组合)\MySQL(和PHP搭配之最佳组合) Server 5.0\bin>MySQL(和PHP搭配之最佳组
1.2 MySQL(和PHP搭配之最佳组合)服务器状态变量
MySQL(和PHP搭配之最佳组合)admin查看服务器状态变量(动态变化):
MySQL(和PHP搭配之最佳组合)admin查看服务器状态变量(动态变化):
C:\Program Files\MySQL(和PHP搭配之最佳组合)\MySQL(和PHP搭配之最佳组合) Server 5.0\bin>MySQL(和PHP搭配之最佳组合)admin -uroot -p extended-statusEnter 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(和PHP搭配之最佳组合)服务器的统计和状态指标MySQL(和PHP搭配之最佳组合)> 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(和PHP搭配之最佳组合)服务器状态变量MySQL(和PHP搭配之最佳组合)> show status like 'Bytes_sent%';+---------------+-------+| Variable_name | Value |+---------------+-------+| Bytes_sent | 53052 |+---------------+-------+1 row in set (0.00 sec)MySQL(和PHP搭配之最佳组合)> flush status;Query OK, 0 rows affected (0.00 sec)MySQL(和PHP搭配之最佳组合)> show status like 'Bytes_sent%';+---------------+-------+| Variable_name | Value |+---------------+-------+| Bytes_sent | 11 |+---------------+-------+1 row in set (0.00 sec)
更多精彩
赞助商链接