分享

2、数据库变量(参数)管理

 思懿 2021-06-05
查看变量方法
查看全局级别的系统变量
show global variables \G;
#查看所有跟"版本”相关的属性值
show global variables like '%version%'\G;
#查看字符集相关的全局设置
show global variables where variable_name like 'character%';
#查看某些日志是否开启或关闭
show global variables where variable_name like '%log%' and vale='off';
查看会话级别的参数值
show session variables \G;
show variables;
其他语法
select @@[global.|session.]system_var_name
select @@global.pid_files;
select @@session.warning_count;

修改变量值/设定变量值

SET GLOBAL var_name = value;
SET @@GLOBAL.var_name = value;
SET SESSION var_name = value;
SET @@SESSION.var_name = value;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多