Server System Variables
425
This option is mandatory when starting
mysqld
as
root
. The server changes its user ID during its
startup sequence, causing it to run as that particular user rather than as
root
. See
Section 6.1.1,
“Security Guidelines”
.
To avoid a possible security hole where a user adds a
--user=root
[424]
option to a
my.cnf
file
(thus causing the server to run as
root
),
mysqld
uses only the first
--user
[424]
option specified
and produces a warning if there are multiple
--user
[424]
options. Options in
/etc/my.cnf
and
$MYSQL_HOME/my.cnf
are processed before command-line options, so it is recommended that you
put a
--user
[424]
option in
/etc/my.cnf
and specify a value other than
root
. The option in
/
etc/my.cnf
is found before any other
--user
[424]
options, which ensures that the server runs
as a user other than
root
, and that a warning results if any other
--user
[424]
option is found.
•
--verbose
[425]
,
-v
[425]
Use this option with the
--help
[400]
option for detailed help.
•
--version
[425]
,
-V
Variable Name
version
Variable Scope
Global
Dynamic Variable
No
Display version information and exit.
You can assign a value to a server system variable by using an option of the form
--var_name=value
. For example,
--key_buffer_size=32M
[458]
sets the
key_buffer_size
[458]
variable to a value of 32MB.
Note that when you assign a value to a variable, MySQL might automatically correct the value to stay
within a given range, or adjust the value to the closest permissible value if only certain values are
permitted.
If you want to restrict the maximum value to which a variable can be set at runtime with
SET
, you can
define this by using the
--maximum-var_name=value
command-line option.
It is also possible to set variables by using
--set-variable=var_name=value
or
-O
var_name=value
syntax. This syntax is deprecated.
You can change the values of most system variables for a running server with the
SET
statement. See
Section 13.7.4, “
SET
Syntax”
.
Section 5.1.4, “Server System Variables”
, provides a full description for all variables, and additional
information for setting them at server startup and runtime.
Section 8.9.2, “Tuning Server Parameters”
,
includes information on optimizing the server by tuning system variables.
5.1.4. Server System Variables
The MySQL server maintains many system variables that indicate how it is configured. Each system
variable has a default value. System variables can be set at server startup using options on the
command line or in an option file. Most of them can be changed dynamically while the server is running
by means of the
SET
statement, which enables you to modify operation of the server without having to
stop and restart it. You can refer to system variable values in expressions.
There are several ways to see the names and values of system variables:
• To see the values that a server will use based on its compiled-in defaults and any option files that it
reads, use this command:
mysqld --verbose --help
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...