mysql system variables and the state variables

 

 

First, the system variables into the global system variables and session system variables: Some variables are both global system variables, only some global variables, some variables only session.
1 , the query variables: 
Show, Ltd. Free Join the Variables like ' log ' \ G; # View global system variable values 
Show the session the Variables like ' log ' \ G; # View conversation system variable values 
Show the Variables like ' log ' \ G; # if the system session variables exist, regardless of whether there is a global system variable, returns a session priority system variables, system variables if the session does not exist, global system variable is returned. 
If only a particular query system variables: 
the SELECT @@ global.var_name; # global system variable
 the SELECT @@ session.var_name; # session system variables
 the SELECT @@ var_name; priority session system variables # 

2 , hot-line system variables change : some system variables can change the hot-line support, and some do not. 
Global var_name SET = value; 
SET var_name the session =value; 
SET var_name = value; 
######## 
SET @@ global.var_name = value; 
SET @@ session.var_name = value; 
SET @@ var_name = value; 


two state variables: are all read-only . Global variables are also divided into state and session state variables. 

View state variables: 
Show, Ltd. Free Join Status \ G; 
Show the session Status \ G; 


Third, modify the configuration file 
as long as the service is restarted, the system will fail to change the variable heat, to permanent changes, you must be online to change the global system variable, then modify the configuration file.

 

Guess you like

Origin www.cnblogs.com/igoodful/p/11789336.html