MySQL数据库维护中监控所用到的常用命令
时间:2024-01-28 03:23:24
status = show status like ‘%%' [例:show status like 'Com_select']
variables = show variables like ‘%%' [例:show variables like 'query_cache_size']
1、MySQL查询次数(status)
Com_select;Com_update;Com_insert;Com_delete;Com_change_db
2、查询缓存空间大小:query_cache_size(variables)
查询缓存最大查询数据集大小:query_cache_limit(variables);
缓存中的查询个数:Qcache_inserts(status);
查询缓存命中率:(Qcache_hits/(Qcache_hits+Qcache_inserts))*100% (status)
3、索引缓存命中率
索引缓存空间大小:key_buffer_size (variables)
索引缓存命中率:(Key_reads/Key_read_requests)*100% (status)
4、并发连接数
最大充许连接数:max_connections(variables)
实际最大连接数:max_used_connections(status)
当前连接数:Threads_connected(status)
活跃连接数:Threads_running(status)
缓存连接数:Threads_cache(status)
5、流量统计(status)
Bytes_received ,Bytes_sent(status)
6、连接次数
每秒连接次数:Connections(status)
每秒实际创建连接次数:Threads_created(status)
7、表锁定统计
立即释放的表锁数:Table_locks_immediate(status)
需要等待的表锁数:Table_locks_waited(status)
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Windows下Anaconda下载安装与配置教程分享
![](https://img.aspxhome.com/file/2023/6/89436_0s.png)
浏览器 cookie 限制
ASP开发的WAP格式简易邮件系统实例
![](https://img.aspxhome.com/file/UploadPic/20086/10/2008610172845968s.jpg)
Python字典的基础操作
从浅入深带你掌握Golang数据结构map
Python爬虫使用脚本登录Github并查看信息
![](https://img.aspxhome.com/file/2023/9/83899_0s.png)
利用Pyhton中的requests包进行网页访问测试的方法
![](https://img.aspxhome.com/file/2023/7/98887_0s.jpg)
详解MySQL如何有效的存储IP地址及字符串IP和数值之间如何转换
python实现定时发送qq消息
![](https://img.aspxhome.com/file/2023/1/109501_0s.jpg)
Python与C语言分别完成排序流程
![](https://img.aspxhome.com/file/2023/5/107855_0s.png)
div、section、article 的区别
PHP和JavaScrip分别获取关联数组的键值示例代码
Python 操作 ElasticSearch的完整代码
![](https://img.aspxhome.com/file/2023/0/79480_0s.png)
python win32 简单操作方法
Python中函数参数匹配模型详解
树型结构在ASP中的简单解决
go语言 bool类型的使用操作
如何实现文件上传并自动归类功能?
Python用内置模块来构建REST服务与RPC服务实战
![](https://img.aspxhome.com/file/2023/4/131504_0s.png)