MySQL中的系统参数

MySQL提供了相当多的系统参数,涉及方方面面。我们可以使用show关键字来查看:

show variables like ‘%keyword%’;

完整的语法是
SHOW [GLOBAL | SESSION] VARIABLES
[LIKE ‘pattern’ | WHERE expr]
由语法可知,系统变量分为global和session两种:
The server maintains two kinds of system variables. Global variables affect the overall operation of the server. Session variables affect its operation for individual client connections. A given system variable can have both a global and a session value. Global and session system variables are related as follows:
When the server starts, it initializes all global variables to their default values. These defaults can be changed by options specified on the command line or in an option file.
The server also maintains a set of session variables for each client that connects. The client’s session variables are initialized at connect time using the current values of the corresponding global variables.
下面是系统参数清单:
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html

指定或修改系统变量
System variable values can be set globally at server startup by using options on the command line or in an option file.也就是说在使用mysqld启动MySQL时,带上参数。或在my.cnf文件中加入。且一部分系统变量可以被动态修改,不需要重启MySQL。例如:

mysql> SET GLOBAL general-log=ON;

下面是所有动态参数的清单:
https://dev.mysql.com/doc/refman/5.7/en/dynamic-system-variables.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值