c++ - mysql中show status like和show variables like数据出处
巴扎黑
巴扎黑 2017-04-17 13:41:39
[MySQL讨论组]

不太清楚show variables与show status的内在区别,我的猜测是:
1.show variables读出的内容来自编译时设置的选项、配置文件、mysql命令行下的动态设置;
2.show status读出的内容则是动态的,是mysql运行时的动态变化:(1)可能来自进程运行时内部动态改变的参数信息;(2)可能来自数据库表:例如information_schema,performance_schema,mysql

不知道我的看法是不是正确,希望高手赐教。先谢过。

巴扎黑
巴扎黑

全部回复(2)
阿神

关于show variables官方文档有提到一些:

System variable information is also available from these sources:
Performance Schema tables. See Section 21.9.12, “Performance Schema System Variable Tables”.
The GLOBAL_VARIABLES and SESSION_VARIABLES tables. See Section 20.10, “The INFORMATION_SCHEMA GLOBAL_VARIABLES and SESSION_VARIABLES Tables”.
The mysqladmin variables command. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”.

关于show status官方文档描述如下:

tatus variable information is also available from these sources:
Performance Schema tables. See Section 21.9.13, “Performance Schema Status Variable Tables”.
The GLOBAL_STATUS and SESSION_STATUS tables. See Section 20.9, “The INFORMATION_SCHEMA GLOBAL_STATUS and SESSION_STATUS Tables”.
The mysqladmin extended-status command. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”.

PHP中文网

看文档很重要,这是mysql官方的说明,附两个链接。
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
https://dev.mysql.com/doc/refman/5.7/en/performance-schema-variable-table-migration.html

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号