.\" Title: \fBmysqld\fR
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1
.\" Date: 09/23/2007
.\" Manual: MySQL Database System
.\" Source: MySQL 5.1
.\"
.TH "\fBMYSQLD\fR" "8" "09/23/2007" "MySQL 5.1" "MySQL Database System"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
mysqld \- the MySQL server
.SH "SYNOPSIS"
.HP 17
\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
\fBmysqld\fR
is the MySQL server. The following discussion covers these MySQL server configuration topics:
.TP 3n
\(bu
Startup options that the server supports
.TP 3n
\(bu
Server system variables
.TP 3n
\(bu
Server status variables
.TP 3n
\(bu
How to set the server SQL mode
.TP 3n
\(bu
The server shutdown process
.sp
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
Not all storage engines are supported by all MySQL server binaries and configurations. To find out how to determine which storage engines are supported by your MySQL server installation, see
Section\ 5.4.14, \(lqSHOW ENGINES Syntax\(rq.
.SH "COMMAND OPTIONS"
.PP
When you start the
\fBmysqld\fR
server, you can specify program options using any of the methods described in
Section\ 3, \(lqSpecifying Program Options\(rq. The most common methods are to provide options in an option file or on the command line. However, in most cases it is desirable to make sure that the server uses the same options each time it runs. The best way to ensure this is to list them in an option file. See
Section\ 3.2, \(lqUsing Option Files\(rq.
.PP
\fBmysqld\fR
reads options from the
[mysqld]
and
[server]
groups.
\fBmysqld_safe\fR
reads options from the
[mysqld],
[server],
[mysqld_safe], and
[safe_mysqld]
groups.
\fBmysql.server\fR
reads options from the
[mysqld]
and
[mysql.server]
groups.
.PP
An embedded MySQL server usually reads options from the
[server],
[embedded], and
[\fIxxxxx\fR_SERVER]
groups, where
\fIxxxxx\fR
is the name of the application into which the server is embedded.
.PP
\fBmysqld\fR
accepts many command options. For a brief summary, execute
\fBmysqld \-\-help\fR. To see the full list, use
\fBmysqld \-\-verbose \-\-help\fR.
.PP
The following list shows some of the most common server options. Additional options are described in other sections:
.TP 3n
\(bu
Options that affect security: See
Section\ 4.3, \(lqSecurity\-Related \fBmysqld\fR Options\(rq.
.TP 3n
\(bu
SSL\-related options: See
Section\ 6.7.3, \(lqSSL Command Options\(rq.
.TP 3n
\(bu
Binary log control options: See
Section\ 9.4, \(lqThe Binary Log\(rq.
.TP 3n
\(bu
Replication\-related options: See
Section\ 1.3, \(lqReplication Options and Variables\(rq.
.TP 3n
\(bu
Options specific to particular storage engines: See
Section\ 4.1, \(lqMyISAM Startup Options\(rq,
Section\ 5.4, \(lqInnoDB Startup Options and System Variables\(rq, and
Section\ 6.2.1, \(lqMySQL Cluster\-Related Command Options for \fBmysqld\fR\(rq.
.sp
.RE
.PP
You can also set the values of server system variables by using variable names as options, as described later in this section.
.TP 3n
\(bu
\fB\-\-help\fR,
\fB\-?\fR
.sp
Display a short help message and exit. Use both the
\fB\-\-verbose\fR
and
\fB\-\-help\fR
options to see the full message.
.TP 3n
\(bu
\fB\-\-abort\-slave\-event\-count\fR
.sp
This option is used internally by the MySQL test suite for replication testing and debugging.
.TP 3n
\(bu
\fB\-\-allow\-suspicious\-udfs\fR
.sp
This option controls whether user\-defined functions that have only an
xxx
symbol for the main function can be loaded. By default, the option is off and only UDFs that have at least one auxiliary symbol can be loaded; this prevents attempts at loading functions from shared object files other than those containing legitimate UDFs. See
Section\ 3.4.6, \(lqUser\-Defined Function Security Precautions\(rq.
.TP 3n
\(bu
\fB\-\-ansi\fR
.sp
Use standard (ANSI) SQL syntax instead of MySQL syntax. For more precise control over the server SQL mode, use the
\fB\-\-sql\-mode\fR
option instead. See
Section\ 9.3, \(lqRunning MySQL in ANSI Mode\(rq, and
the section called \(lqSQL MODES\(rq.
.TP 3n
\(bu
\fB\-\-basedir=\fR\fB\fIpath\fR\fR,
\fB\-b \fR\fB\fIpath\fR\fR
.sp
The path to the MySQL installation directory. All paths are usually resolved relative to this directory.
.TP 3n
\(bu
\fBbig\-tables\fR
.sp
Allow large result sets by saving all temporary sets in files. This option prevents most
\(lqtable full\(rq
errors, but also slows down queries for which in\-memory tables would suffice. Since MySQL 3.23.2, the server is able to handle large result sets automatically by using memory for small temporary tables and switching to disk tables where necessary.
.TP 3n
\(bu
\fB\-\-bind\-address=\fR\fB\fIIP\fR\fR
.sp
The IP address to bind to.
.TP 3n
\(bu
\fB\-\-binlog\-format={row|statement|mixed}\fR
.sp
Specify whether to use row\-based, statement\-based, or mixed replication (statement\-based is default). See
Section\ 1.2, \(lqReplication Formats\(rq. This option was added in MySQL 5.1.5.
.TP 3n
\(bu
\fB\-\-binlog\-row\-event\-max\-size=\fR\fB\fIN\fR\fR
.sp
Specify the maximum size of a row\-based binary log event, in bytes. Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256. The default is 1024. See
Section\ 1.2, \(lqReplication Formats\(rq. This option was added in MySQL 5.1.5.
.TP 3n
\(bu
\fB\-\-bootstrap\fR
.sp
This option is used by the
\fBmysql_install_db\fR
script to create the MySQL privilege tables without having to start a full MySQL server.
.sp
This option is unavailable if MySQL was configured with the
\fB\-\-disable\-grant\-options\fR
option. See
Section\ 9.2, \(lqTypical \fBconfigure\fR Options\(rq.
.TP 3n
\(bu
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
The directory where character sets are installed. See
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
.TP 3n
\(bu
\fB\-\-character\-set\-client\-handshake\fR
.sp
Don't ignore character set information sent by the client. To ignore client information and use the default server character set, use
\fB\-\-skip\-character\-set\-client\-handshake\fR; this makes MySQL behave like MySQL 4.0.
.TP 3n
\(bu
\fB\-\-character\-set\-filesystem=\fR\fB\fIcharset_name\fR\fR
.sp
The filesystem character set. This option sets the
character_set_filesystem
system variable. It was added in MySQL 5.1.6.
.TP 3n
\(bu
\fB\-\-character\-set\-server=\fR\fB\fIcharset_name\fR\fR,
\fB\-C \fR\fB\fIcharset_name\fR\fR
.sp
Use
\fIcharset_name\fR
as the default server character set. See
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq. If you use this option to specify a non\-default character set, you should also use
\fB\-\-collation\-server\fR
to specify the collation.
.TP 3n
\(bu
\fB\-\-chroot=\fR\fB\fIpath\fR\fR
.sp
Put the
\fBmysqld\fR
server in a closed environment during startup by using the
chroot()
system call. This is a recommended security measure. Note that use of this option somewhat limits
LOAD DATA INFILE
and
SELECT ... INTO OUTFILE.
.TP 3n
\(bu
\fB\-\-collation\-server=\fR\fB\fIcollation_name\fR\fR
.sp
Use
\fIcollation_name\fR
as the default server collation. See
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
.TP 3n
\(bu
\fB\-\-console\fR
.sp
(Windows only.) Write error log messages to
stderr
and
stdout
even if
\fB\-\-log\-error\fR
is specified.
\fBmysqld\fR
does not close the console window if this option is used.
.TP 3n
\(bu
\fB\-\-core\-file\fR
.sp
Write a core file if
\fBmysqld\fR
dies. For some systems, you must also specify the
\fB\-\-core\-file\-size\fR
option to
\fBmysqld_safe\fR. See
\fBmysqld_safe\fR(1). Note that on some systems, such as Solaris, you do not get a core file if you are also using the
\fB\-\-user\fR
option.
.TP 3n
\(bu
\fB\-\-datadir=\fR\fB\fIpath\fR\fR,
\fB\-h \fR\fB\fIpath\fR\fR
.sp
The path to the data directory.
.TP 3n
\(bu
\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR
.sp
If MySQL is configured with
\fB\-\-with\-debug\fR, you can use this option to get a trace file of what
\fBmysqld\fR
is doing. The
\fIdebug_options\fR
string often is
\'d:t:o,\fIfile_name\fR'. The default is
\'d:t:i:o,mysqld.trace'. See
[1]\&\fIMySQL Internals: Porting\fR.
.sp
As of MySQL 5.1.12, using
\fB\-\-with\-debug\fR
to configure MySQL with debugging support enables you to use the
\fB\-\-debug="d,parser_debug"\fR
option when you start the server. This causes the Bison parser that is used to process SQL statements to dump a parser trace to the server's standard error output. Typically, this output is written to the error log.
.TP 3n
\(bu
\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR
(\fIDEPRECATED\fR)
.sp
Use
\fIcharset_name\fR
as the default character set. This option is deprecated in favor of
\fB\-\-character\-set\-server\fR. See
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
.TP 3n
\(bu
\fB\-\-default\-collation=\fR\fB\fIcollation_name\fR\fR
.sp
Use
\fIcollation_name\fR
as the default collation. This option is deprecated in favor of
\fB\-\-collation\-server\fR. See
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
.TP 3n
\(bu
\fB\-\-default\-storage\-engine=\fR\fB\fItype\fR\fR
.sp
Set the default storage engine (table type) for tables. See
Chapter\ 13, Storage Engines.
.TP 3n
\(bu
\fB\-\-default\-table\-type=\fR\fB\fItype\fR\fR
.sp
This option is a synonym for
\fB\-\-default\-storage\-engine\fR.
.TP 3n
\(bu
\fB\-\-default\-time\-zone=\fR\fB\fItimezone\fR\fR
.sp
Set the default server time zone. This option sets the global
time_zone
system variable. If this option is not given, the default time zone is the same as the system time zone (given by the value of the
system_time_zone
system variable.
.TP 3n
\(bu
\fB\-\-delay\-key\-write[={OFF|ON|ALL}]\fR
.sp
Specify how to use delayed key writes. Delayed key writing causes key buffers not to be flushed between writes for
MyISAM
tables.
OFF
disables delayed key writes.
ON
enables delayed key writes for those tables that were created with the
DELAY_KEY_WRITE
option.
ALL
delays key writes for all
MyISAM
tables. See
Section\ 5.2, \(lqTuning Server Parameters\(rq, and
Section\ 4.1, \(lqMyISAM Startup Options\(rq.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
If you set this variable to
ALL, you should not use
MyISAM
tables from within another program (such as another MySQL server or
\fBmyisamchk\fR) when the tables are in use. Doing so leads to index corruption.
.TP 3n
\(bu
\fB\-\-des\-key\-file=\fR\fB\fIfile_name\fR\fR
.sp
Read the default DES keys from this file. These keys are used by the
DES_ENCRYPT()
and
DES_DECRYPT()
functions.
.TP 3n
\(bu
\fB\-\-disconnect\-slave\-event\-count\fR
.sp
This option is used internally by the MySQL test suite for replication testing and debugging.
.TP 3n
\(bu
\fB\-\-enable\-named\-pipe\fR
.sp
Enable support for named pipes. This option applies only on Windows NT, 2000, XP, and 2003 systems. For MySQL 5.1.20 and earler, this option is available only when using the
\fBmysqld\-nt\fR
and
mysqld\-debug
servers that support named\-pipe connections. For MySQL 5.1.21 and later,
\fBmysqld\-nt\fR
is not available, but support is included in the standard
\fBmysqld\fR
and
\fBmysqld\-debug\fR
servers.
.TP 3n
\(bu
\fB\-\-event\-scheduler\fR
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l
l l.
T{
\fBName\fR
T}:T{
event\-scheduler
T}
T{
\fBDescription\fR
T}:T{
Enable/disable and start/stop the event scheduler. Note that this variable underwent significant changes in behavior and permitted values in MySQL 5.1.11 and 5.1.12
T}
T{
\fBVersion Introduced\fR
T}:T{
5.1.6
T}
T{
\fBOption Sets Variable\fR
T}:T{
Yes, event_scheduler
T}
T{
\fBVariable Name\fR
T}:T{
event\-scheduler
T}
T{
\fBVariable Scope\fR
T}:T{
Server
T}
T{
\fBDynamic Variable\fR
T}:T{
no
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l
l l
l l.
T{
\fBType\fR
T}:T{
enumeration
T}
T{
\fBDefault\fR
T}:T{
OFF
T}
T{
\fBValid Values\fR
T}:T{
ON, OFF, DISABLED
T}
.TE
.sp
Enable or disable, and start or stop, the event scheduler. This option was added in MySQL 5.1.6. Note that its permitted values and behaviour changed in MySQL 5.1.11, and again in MySQL 5.1.12.
.sp
For detailed information, see
The \fBevent\-scheduler\fR Option.
.TP 3n
\(bu
\fB\-\-exit\-info[=\fR\fB\fIflags\fR\fR\fB]\fR,
\fB\-T [\fR\fB\fIflags\fR\fR\fB]\fR
.sp
This is a bit mask of different flags that you can use for debugging the
\fBmysqld\fR
server. Do not use this option unless you know
\fIexactly\fR
what it does!
.TP 3n
\(bu
\fB\-\-external\-locking\fR
.sp
Enable external locking (system locking), which is disabled by default as of MySQL 4.0. Note that if you use this option on a system on which
lockd
does not fully work (such as Linux), it is easy for
\fBmysqld\fR
to deadlock. This option previously was named
\fB\-\-enable\-locking\fR.
.sp
For more information about external locking, including conditions under which it can and cannot be used, see
Section\ 3.4, \(lqExternal Locking\(rq.
.TP 3n
\(bu
\fB\-\-flush\fR
.sp
Flush (synchronize) all changes to disk after each SQL statement. Normally, MySQL does a write of all changes to disk only after each SQL statement and lets the operating system handle the synchronizing to disk. See
Section\ 1.4.2, \(lqWhat to Do If MySQL Keeps Crashing\(rq.
.TP 3n
\(bu
\fB\-\-general\-log[={0|1}]\fR
.sp
Specify the initial general log state, if the
\fB\-\-log\fR
or
\fB\-l\fR
option is given. With no argument or an argument of 0, the
\fB\-\-general\-log\fR
option disables the log. If omitted or given with an argument of 1, the option enables the log. If
\fB\-\-log\fR
or
\fB\-l\fR
is not specified,
\fB\-\-general\-log\fR
has no effect. This option was added in MySQL 5.1.12.
.TP 3n
\(bu
\fB\-\-enable\-pstack\fR
.sp
Print a symbolic stack trace on failure.
.TP 3n
\(bu
\fB\-\-gdb\fR
.sp
Install an interrupt handler for
SIGINT
(needed to stop
\fBmysqld\fR
with
^C
to set breakpoints) and disable stack tracing and core file handling. See
[1]\&\fIMySQL Internals: Porting\fR.
.TP 3n
\(bu
\fB\-\-init\-file=\fR\fB\fIfile_name\fR\fR
.sp
Read SQL statements from this file at startup. Each statement must be on a single line and should not include comments.
.sp
This option is unavailable if MySQL was configured with the
\fB\-\-disable\-grant\-options\fR
option. See
Section\ 9.2, \(lqTypical \fBconfigure\fR Options\(rq.
.TP 3n
\(bu
\fB\-\-innodb\-\fR\fB\fIxxx\fR\fR
.sp
The
InnoDB
options are listed in
Section\ 5.4, \(lqInnoDB Startup Options and System Variables\(rq.
.TP 3n
\(bu
\fB\-\-language=\fR\fB\fIlang_name\fR\fR\fB, \-L \fR\fB\fIlang_name\fR\fR
.sp
Return client error messages in the given language.
\fIlang_name\fR
can be given as the language name or as the full pathname to the directory where the language files are installed. See
Section\ 8.2, \(lqSetting the Error Message Language\(rq.
.TP 3n
\(bu
\fB\-\-large\-pages\fR
.sp
Some hardware/operating system architectures support memory pages greater than the default (usually 4KB). The actual implementation of this support depends on the underlying hardware and OS. Applications that perform a lot of memory accesses may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses.
.sp
Currently, MySQL supports only the Linux implementation of large pages support (which is called HugeTLB in Linux). We have plans to extend this support to FreeBSD, Solaris and possibly other platforms.
.sp
Before large pages can be used on Linux, it is necessary to configure the HugeTLB memory pool. For reference, consult the
\fIhugetlbpage.txt\fR
file in the Linux kernel source.
.sp
This option is disabled by default.
.TP 3n
\(bu
\fB\-\-log[=\fR\fB\fIfile_name\fR\fR\fB]\fR,
\fB\-l [\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
This option enables logging to the general query log, which contains entries that record client connections and SQL statements received from clients. The log output destination can be selected with the
\fB\-\-log\-output\fR
option as of MySQL 5.1.6. Before 5.1.6, logging occurs to the general query log file. If you omit the filename, MySQL uses
\fI\fIhost_name\fR\fR\fI.log\fR
as the filename. See
Section\ 9.1, \(lqSelecting General Query and Slow Query Log Output Destinations\(rq, and
Section\ 9.3, \(lqThe General Query Log\(rq.
.TP 3n
\(bu
\fB\-\-log\-bin[=\fR\fB\fIbase_name\fR\fR\fB]\fR
.sp
Enable binary logging. The server logs all statements that change data to the binary log, which is used for backup and replication. See
Section\ 9.4, \(lqThe Binary Log\(rq.
.sp
The option value, if given, is the basename for the log sequence. The server creates binary log files in sequence by adding a numeric suffix to the basename. It is recommended that you specify a basename (see
Section\ 1.8.1, \(lqOpen Issues in MySQL\(rq, for the reason). Otherwise, MySQL uses
\fI\fIhost_name\fR\fR\fI\-bin\fR
as the basename.
.TP 3n
\(bu
\fB\-\-log\-bin\-index[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
The index file for binary log filenames. See
Section\ 9.4, \(lqThe Binary Log\(rq. If you omit the filename, and if you didn't specify one with
\fB\-\-log\-bin\fR, MySQL uses
\fI\fIhost_name\fR\fR\fI\-bin.index\fR
as the filename.
.TP 3n
\(bu
\fB\-\-log\-bin\-trust\-function\-creators[={0|1}]\fR
.sp
With no argument or an argument of 1, this option sets the
log_bin_trust_function_creators
system variable to 1. With an argument of 0, this option sets the system variable to 0.
log_bin_trust_function_creators
affects how MySQL enforces restrictions on stored function creation. See
Section\ 4, \(lqBinary Logging of Stored Routines and Triggers\(rq.
.TP 3n
\(bu
\fB\-\-log\-error[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
Log errors and startup messages to this file. See
Section\ 9.2, \(lqThe Error Log\(rq. If you omit the filename, MySQL uses
\fI\fIhost_name\fR\fR\fI.err\fR. If the filename has no extension, the server adds an extension of
\fI.err\fR.
.TP 3n
\(bu
\fB\-\-log\-isam[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
Log all
MyISAM
changes to this file (used only when debugging
MyISAM).
.TP 3n
\(bu
\fB\-\-log\-long\-format\fR
(\fIDEPRECATED\fR)
.sp
Log extra information to the binary log and slow query log, if they have been activated. For example, the username and timestamp are logged for all queries. This option is deprecated, as it now represents the default logging behavior. (See the description for
\fB\-\-log\-short\-format\fR.) The
\fB\-\-log\-queries\-not\-using\-indexes\fR
option is available for the purpose of logging queries that do not use indexes to the slow query log.
.TP 3n
\(bu
\fB\-\-log\-output[=\fR\fB\fIvalue\fR\fR\fB,...]\fR
.sp
This option determines the destination for general query log and slow query log output. The option value can be given as one or more of the words
TABLE,
FILE, or
NONE. If the option is given without a value, the default is
TABLE
(log to the
general_log
and
slow_log
tables in the
mysql
database).
FILE
causes logging to log files. (For
FILE
logging, the
\fB\-\-log\fR
and
\fB\-slow\-log\fR
options determine the log file location.)
NONE
disables logging. If
NONE
is present in the option value, it takes precedence over any other words that are present.
TABLE
and
FILE
can both be given to select to both log output destinations.
.sp
This option selects log output destinations, but does not enable log output. To do that, use the
\fB\-\-log\fR
and
\fB\-\-log\-slow\-queries\fR
options. For more information, see
Section\ 9.1, \(lqSelecting General Query and Slow Query Log Output Destinations\(rq.
.sp
The
\fB\-\-log\-output\fR
option was added in MySQL 5.1.6.
.TP 3n
\(bu
\fB\-\-log\-queries\-not\-using\-indexes\fR
.sp
If you are using this option with
\fB\-\-log\-slow\-queries\fR, queries that do not use indexes are logged to the slow query log. See
Section\ 9.5, \(lqThe Slow Query Log\(rq.
.TP 3n
\(bu
\fB\-\-log\-short\-format\fR
.sp
Log less information to the binary log and slow query log, if they have been activated. For example, the username and timestamp are not logged for queries.
.TP 3n
\(bu
\fB\-\-log\-slow\-admin\-statements\fR
.sp
Log slow administrative statements such as
OPTIMIZE TABLE,
ANALYZE TABLE, and
ALTER TABLE
to the slow query log.
.TP 3n
\(bu
\fB\-\-log\-slow\-queries[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
This option enables logging to the slow query log, which contains entries for all queries that have taken more than
long_query_time
seconds to execute. See the descriptions of the
\fB\-\-log\-long\-format\fR
and
\fB\-\-log\-short\-format\fR
options for details.
.sp
The log output destination can be selected with the
\fB\-\-log\-output\fR
option as of MySQL 5.1.6. Before 5.1.6, logging occurs to the slow query log file. If you omit the filename, MySQL uses
\fI\fIhost_name\fR\fR\fI\-slow.log\fR
as the filename. See
Section\ 9.1, \(lqSelecting General Query and Slow Query Log Output Destinations\(rq, and
Section\ 9.5, \(lqThe Slow Query Log\(rq.
.TP 3n
\(bu
\fB\-\-log\-tc=\fR\fB\fIfile_name\fR\fR
.sp
The name of the memory\-mapped transaction coordinator log file (for XA transactions that affect multiple storage engines when the binary log is disabled). The default name is
\fItc.log\fR. The file is created under the data directory if not given as a full pathname. Currently, this option is unused.
.TP 3n
\(bu
\fB\-\-log\-tc\-size=\fR\fB\fIsize\fR\fR
.sp
The size in bytes of the memory\-mapped transaction coordinator log. The default size is 24KB.
.TP 3n
\(bu
\fB\-\-log\-warnings[=\fR\fB\fIlevel\fR\fR\fB]\fR,
\fB\-W [\fR\fB\fIlevel\fR\fR\fB]\fR
.sp
Print out warnings such as
Aborted connection...
to the error log. Enabling this option is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). This option is enabled (1) by default, and the default
\fIlevel\fR
value if omitted is 1. To disable this option, use
\fB\-\-log\-warnings=0\fR. Aborted connections are not logged to the error log unless the value is greater than 1. See
Section\ 1.2.10, \(lqCommunication Errors and Aborted Connections\(rq.
.TP 3n
\(bu
\fB\-\-low\-priority\-updates\fR
.sp
Give table\-modifying operations (INSERT,
REPLACE,
DELETE,
UPDATE) lower priority than selects. This can also be done via
{INSERT | REPLACE | DELETE | UPDATE} LOW_PRIORITY ...
to lower the priority of only one query, or by
SET LOW_PRIORITY_UPDATES=1
to change the priority in one thread. This affects only storage engines that use only table\-level locking (MyISAM,
MEMORY,
MERGE). See
Section\ 3.2, \(lqTable Locking Issues\(rq.
.TP 3n
\(bu
\fB\-\-max\-binlog\-dump\-events\fR
.sp
This option is used internally by the MySQL test suite for replication testing and debugging.
.TP 3n
\(bu
\fB\-\-memlock\fR
.sp
Lock the
\fBmysqld\fR
process in memory. This works on systems such as Solaris that support the
mlockall()
system call. This might help if you have a problem where the operating system is causing
\fBmysqld\fR
to swap on disk. Note that use of this option requires that you run the server as
root, which is normally not a good idea for security reasons. See
Section\ 4.5, \(lqHow to Run MySQL as a Normal User\(rq.
.TP 3n
\(bu
\fB\-\-myisam\-recover[=\fR\fB\fIoption\fR\fR\fB[,\fR\fB\fIoption\fR\fR\fB]...]]\fR
.sp
Set the
MyISAM
storage engine recovery mode. The option value is any combination of the values of
DEFAULT,
BACKUP,
FORCE, or
QUICK. If you specify multiple values, separate them by commas. You can also use a value of
""
to disable this option. If this option is used, each time
\fBmysqld\fR
opens a
MyISAM
table, it checks whether the table is marked as crashed or wasn't closed properly. (The last option works only if you are running with external locking disabled.) If this is the case,
\fBmysqld\fR
runs a check on the table. If the table was corrupted,
\fBmysqld\fR
attempts to repair it.
.sp
The following options affect how the repair works:
.TS
allbox tab(:);
l l
l l
l l
l l
l l.
T{
\fBOption\fR
T}:T{
\fBDescription\fR
T}
T{
DEFAULT
T}:T{
The same as not giving any option to \fB\-\-myisam\-recover\fR.
T}
T{
BACKUP
T}:T{
If the data file was changed during recovery, save a backup of the
\fI\fItbl_name\fR\fR\fI.MYD\fR
file as
\fI\fItbl_name\-datetime\fR\fR\fI.BAK\fR.
T}
T{
FORCE
T}:T{
Run recovery even if we would lose more than one row from the
\fI.MYD\fR file.
T}
T{
QUICK
T}:T{
Don't check the rows in the table if there aren't any delete blocks.
T}
.TE
.sp
Before the server automatically repairs a table, it writes a note about the repair to the error log. If you want to be able to recover from most problems without user intervention, you should use the options
BACKUP,FORCE. This forces a repair of a table even if some rows would be deleted, but it keeps the old data file as a backup so that you can later examine what happened.
.sp
See
Section\ 4.1, \(lqMyISAM Startup Options\(rq.
.TP 3n
\(bu
\fB\-\-ndb\-cluster\-connection\-pool=\fR\fB\fIvalue\fR\fR
.PP
\fBMySQL Cluster 5.1 Carrier Grade Edition\fR. The following information applies to users of MySQL Cluster 5.1 Carrier Grade Edition only. For more information about MySQL Cluster 5.1 Carrier Grade Edition, see
Section\ 2, \(lqMySQL Cluster 5.1 Carrier Grade Edition\(rq.
This option controls how many connections are made to a MySQL Cluster by a MySQL server acting as a cluster SQL node. Normally,
\fBmysqld\fR
uses only a single connection to the cluster, and the usual way to scale out is by adding more SQL nodes (\fBmysqld\fR
instances). However, by setting this option to a value greater than 1 (the default), it is possible to scale out by allowing multiple MySQL clients to leverage multiple connections made to the cluster by a single MySQL server. The maximum possible is 63.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBImportant\fR
When this option is set to a value
\fIN\fR, there must be at least
\fIN\fR
[mysqld]
or
[api]
slots available for use; if there are fewer than this number, no MySQL clients are able to connect to the MySQL server.
This option was added in MySQL 5.1.19/NDB\-6.2.2.
.sp
The following information applies to all MySQL Cluster users.
.TP 3n
\(bu
\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR
.sp
When using the
NDB
storage engine, it is possible to point out the management server that distributes the cluster configuration by setting the connect string option. See
Section\ 4.4.2, \(lqThe Cluster Connectstring\(rq, for syntax.
.TP 3n
\(bu
\fB\-\-ndbcluster\fR
.sp
If the binary includes support for the
NDB Cluster
storage engine, this option enables the engine, which is disabled by default. See
Chapter\ 16, MySQL Cluster.
.TP 3n
\(bu
\fB\-\-old\-passwords\fR
.sp
Force the server to generate short (pre\-4.1) password hashes for new passwords. This is useful for compatibility when the server must support older client programs. See
Section\ 5.9, \(lqPassword Hashing as of MySQL 4.1\(rq.
.TP 3n
\(bu
\fB\-\-one\-thread\fR
.sp
Only use one thread (for debugging under Linux). This option is available only if the server is built with debugging enabled. See
[1]\&\fIMySQL Internals: Porting\fR.
.sp
As of MySQL 5.1.17, this option is deprecated; use
\fB\-\-thread_handling=one\-thread\fR
instead.
.TP 3n
\(bu
\fB\-\-open\-files\-limit=\fR\fB\fIcount\fR\fR
.sp
Change the number of file descriptors available to
\fBmysqld\fR. If this option is not set or is set to 0,
\fBmysqld\fR
uses the value to reserve file descriptors with
setrlimit(). If the value is 0,
\fBmysqld\fR
reserves
max_connections\(mu5
or
max_connections + table_open_cache\(mu2
files (whichever is larger). You should try increasing this value if
\fBmysqld\fR
gives you the error
Too many open files.
.TP 3n
\(bu
\fB\-\-pid\-file=\fR\fB\fIpath\fR\fR
.sp
The pathname of the process ID file. This file is used by other programs such as
\fBmysqld_safe\fR
to determine the server's process ID.
.TP 3n
\(bu
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
The port number to use when listening for TCP/IP connections. The port number must be 1024 or higher unless the server is started by the
root
system user.
.TP 3n
\(bu
\fB\-\-port\-open\-timeout=\fR\fB\fInum\fR\fR
.sp
On some systems, when the server is stopped, the TCP/IP port might not become available immediately. If the server is restarted quickly afterward, its attempt to reopen the port can fail. This option indicates how many seconds the server should wait for the TCP/IP port to become free if it cannot be opened. The default is not to wait. This option was added in MySQL 5.1.5.
.TP 3n
\(bu
\fB\-\-safe\-mode\fR
.sp
Skip some optimization stages.
.TP 3n
\(bu
\fB\-\-safe\-show\-database\fR
(\fIDEPRECATED\fR)
.sp
See
Section\ 5.3, \(lqPrivileges Provided by MySQL\(rq.
.TP 3n
\(bu
\fB\-\-safe\-user\-create\fR
.sp
If this option is enabled, a user cannot create new MySQL users by using the
GRANT
statement unless the user has the
INSERT
privilege for the
mysql.user
table or any column in the table. If you want a user to have the ability to create new users that have those privileges that the user has the right to grant, you should grant the user the following privilege:
.sp
.RS 3n
.nf
GRANT INSERT(user) ON mysql.user TO '\fIuser_name\fR'@'\fIhost_name\fR';
.fi
.RE
This ensures that the user cannot change any privilege columns directly, but has to use the
GRANT
statement to give privileges to other users.
.TP 3n
\(bu
\fB\-\-secure\-auth\fR
.sp
Disallow authentication by clients that attempt to use accounts that have old (pre\-4.1) passwords.
.TP 3n
\(bu
\fB\-\-secure\-file\-priv=\fR\fB\fIpath\fR\fR
.sp
This option limits the effect of the
LOAD_FILE()
function and the
LOAD DATA
and
SELECT ... INTO OUTFILE
statements to work only with files in the specified directory.
.sp
This option was added in MySQL 5.1.17.
.TP 3n
\(bu
\fB\-\-shared\-memory\fR
.sp
Enable shared\-memory connections by local clients. This option is available only on Windows.
.TP 3n
\(bu
\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
.sp
The name of shared memory to use for shared\-memory connections. This option is available only on Windows. The default name is
MYSQL. The name is case sensitive.
.TP 3n
\(bu
\fB\-\-skip\-concurrent\-insert\fR
.sp
Turn off the ability to select and insert at the same time on
MyISAM
tables. (This is to be used only if you think you have found a bug in this feature.) See
Section\ 3.3, \(lqConcurrent Inserts\(rq.
.TP 3n
\(bu
\fB\-\-skip\-external\-locking\fR
.sp
Do not use external locking (system locking). For more information about external locking, including conditions under which it can and cannot be used, see
Section\ 3.4, \(lqExternal Locking\(rq.
.sp
External locking has been disabled by default since MySQL 4.0.
.TP 3n
\(bu
\fB\-\-skip\-grant\-tables\fR
.sp
This option causes the server not to use the privilege system at all, which gives anyone with access to the server
\fIunrestricted access to all databases\fR. You can cause a running server to start using the grant tables again by executing
\fBmysqladmin flush\-privileges\fR
or
\fBmysqladmin reload\fR
command from a system shell, or by issuing a MySQL
FLUSH PRIVILEGES
statement after connecting to the server. This option also suppresses loading of plugins and user\-defined functions (UDFs). Beginning with MySQL 5.1.17, it also suppresses loading of scheduled events ([2]\&\fIBug#28607\fR).
.sp
This option is unavailable if MySQL was configured with the
\fB\-\-disable\-grant\-options\fR
option. See
Section\ 9.2, \(lqTypical \fBconfigure\fR Options\(rq.
.TP 3n
\(bu
\fB\-\-skip\-host\-cache\fR
.sp
Do not use the internal hostname cache for faster name\-to\-IP resolution. Instead, query the DNS server every time a client connects. See
Section\ 5.9, \(lqHow MySQL Uses DNS\(rq.
.TP 3n
\(bu
\fB\-\-skip\-innodb\fR
.sp
Disable the
InnoDB
storage engine. This saves memory and disk space and might speed up some operations. Do not use this option if you require
InnoDB
tables.
.TP 3n
\(bu
\fB\-\-skip\-name\-resolve\fR
.sp
Do not resolve hostnames when checking client connections. Use only IP numbers. If you use this option, all
Host
column values in the grant tables must be IP numbers or
localhost. See
Section\ 5.9, \(lqHow MySQL Uses DNS\(rq.
.TP 3n
\(bu
\fB\-\-skip\-ndbcluster\fR
.sp
Disable the
NDB Cluster
storage engine. This is the default for binaries that were built with
NDB Cluster
storage engine support; the server allocates memory and other resources for this storage engine only if the
\fB\-\-ndbcluster\fR
option is given explicitly. See
Section\ 4.3, \(lqQuick Test Setup of MySQL Cluster\(rq, for an example of usage.
.TP 3n
\(bu
\fB\-\-skip\-networking\fR
.sp
Don't listen for TCP/IP connections at all. All interaction with
\fBmysqld\fR
must be made via named pipes or shared memory (on Windows) or Unix socket files (on Unix). This option is highly recommended for systems where only local clients are allowed. See
Section\ 5.9, \(lqHow MySQL Uses DNS\(rq.
.TP 3n
\(bu
\fB\-\-sporadic\-binlog\-dump\-fail\fR
.sp
This option is used internally by the MySQL test suite for replication testing and debugging.
.TP 3n
\(bu
\fB\-\-ssl*\fR
.sp
Options that begin with
\fB\-\-ssl\fR
specify whether to allow clients to connect via SSL and indicate where to find SSL keys and certificates. See
Section\ 6.7.3, \(lqSSL Command Options\(rq.
.TP 3n
\(bu
\fB\-\-standalone\fR
.sp
Available on Windows NT\-based systems only; instructs the MySQL server not to run as a service.
.TP 3n
\(bu
\fB\-\-symbolic\-links\fR,
\fB\-\-skip\-symbolic\-links\fR
.sp
Enable or disable symbolic link support. This option has different effects on Windows and Unix:
.RS 3n
.TP 3n
\(bu
On Windows, enabling symbolic links allows you to establish a symbolic link to a database directory by creating a
\fI\fIdb_name\fR\fR\fI.sym\fR
file that contains the path to the real directory. See
Section\ 6.1.3, \(lqUsing Symbolic Links for Databases on Windows\(rq.
.TP 3n
\(bu
On Unix, enabling symbolic links means that you can link a
MyISAM
index file or data file to another directory with the
INDEX DIRECTORY
or
DATA DIRECTORY
options of the
CREATE TABLE
statement. If you delete or rename the table, the files that its symbolic links point to also are deleted or renamed. See
Section\ 6.1.2, \(lqUsing Symbolic Links for Tables on Unix\(rq.
.RE
.TP 3n
\(bu
\fB\-\-skip\-safemalloc\fR
.sp
If MySQL is configured with
\fB\-\-with\-debug=full\fR, all MySQL programs check for memory overruns during each memory allocation and memory freeing operation. This checking is very slow, so for the server you can avoid it when you don't need it by using the
\fB\-\-skip\-safemalloc\fR
option.
.TP 3n
\(bu
\fB\-\-skip\-show\-database\fR
.sp
With this option, the
SHOW DATABASES
statement is allowed only to users who have the
SHOW DATABASES
privilege, and the statement displays all database names. Without this option,
SHOW DATABASES
is allowed to all users, but displays each database name only if the user has the
SHOW DATABASES
privilege or some privilege for the database. Note that
\fIany\fR
global privilege is considered a privilege for the database.
.TP 3n
\(bu
\fB\-\-skip\-stack\-trace\fR
.sp
Don't write stack traces. This option is useful when you are running
\fBmysqld\fR
under a debugger. On some systems, you also must use this option to get a core file. See
[1]\&\fIMySQL Internals: Porting\fR.
.TP 3n
\(bu
\fB\-\-skip\-thread\-priority\fR
.sp
Disable using thread priorities for faster response time.
.TP 3n
\(bu
\fB\-\-slow\-query\-log[={0|1}]\fR
.sp
Specify the initial slow query log state, if the
\fB\-\-log\-slow\-queries\fR
option is given. With no argument or an argument of 0, the
\fB\-\-slow\-query\-log\fR
option disables the log. If omitted or given with an argument of 1, the option enables the log. If
\fB\-\-log\fR
or
\fB\-l\fR
is not specified,
\fB\-\-slow\-query\-log\fR
has no effect. This option was added in MySQL 5.1.12.
.TP 3n
\(bu
\fB\-\-socket=\fR\fB\fIpath\fR\fR
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l.
T{
\fBName\fR
T}:T{
socket
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
T{
\fBDescription\fR
T}:T{
Socket file to use for connection
T}
T{
\fBOption Sets Variable\fR
T}:T{
Yes, socket
T}
T{
\fBVariable Name\fR
T}:T{
socket
T}
T{
\fBVariable Scope\fR
T}:T{
Server
T}
T{
\fBDynamic Variable\fR
T}:T{
no
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l l
l l l.
T{
\fBType\fR
T}:T{
linux
T}:T{
filename
T}
T{
\fBDefault\fR
T}:T{
/tmp/mysql.sock
T}:T{
\
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l l
l l l.
T{
\fBType\fR
T}:T{
hpux
T}:T{
filename
T}
T{
\fBDefault\fR
T}:T{
/tmp/mysql.sock
T}:T{
\
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l l
l l l.
T{
\fBType\fR
T}:T{
solaris
T}:T{
filename
T}
T{
\fBDefault\fR
T}:T{
/tmp/mysql.sock
T}:T{
\
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l l
l l l.
T{
\fBType\fR
T}:T{
macosx
T}:T{
filename
T}
T{
\fBDefault\fR
T}:T{
/tmp/mysql.sock
T}:T{
\
T}
.TE
.sp
On Unix, this option specifies the Unix socket file to use when listening for local connections. The default value is
\fI/tmp/mysql.sock\fR. On Windows, the option specifies the pipe name to use when listening for local connections that use a named pipe. The default value is
MySQL
(not case sensitive).
.TP 3n
\(bu
\fB\-\-sql\-mode=\fR\fB\fIvalue\fR\fR\fB[,\fR\fB\fIvalue\fR\fR\fB[,\fR\fB\fIvalue\fR\fR\fB...]]\fR
.sp
Set the SQL mode. See
the section called \(lqSQL MODES\(rq.
.TP 3n
\(bu
\fB\-\-sysdate\-is\-now\fR
.sp
SYSDATE()
by default returns the time at which it executes, not the time at which the statement in which it occurs begins executing. This differs from the behavior of
NOW(). This option causes
SYSDATE()
to be an alias for
NOW(). For information about the implications for binary logging and replication, see the description for
SYSDATE()
in
Section\ 6, \(lqDate and Time Functions\(rq
and for
SET TIMESTAMP
in
Section\ 5.3, \(lqSET Syntax\(rq.
.sp
This option was added in MySQL 5.1.8.
.TP 3n
\(bu
\fB\-\-tc\-heuristic\-recover={COMMIT|ROLLBACK}\fR
.sp
The type of decision to use in the heuristic recovery process. Currently, this option is unused.
.TP 3n
\(bu
\fB\-\-temp\-pool\fR
.sp
This option causes most temporary files created by the server to use a small set of names, rather than a unique name for each new file. This works around a problem in the Linux kernel dealing with creating many new files with different names. With the old behavior, Linux seems to
\(lqleak\(rq
memory, because it is being allocated to the directory entry cache rather than to the disk cache.
.TP 3n
\(bu
\fB\-\-transaction\-isolation=\fR\fB\fIlevel\fR\fR
.sp
Sets the default transaction isolation level. The
level
value can be
READ\-UNCOMMITTED,
READ\-COMMITTED,
REPEATABLE\-READ, or
SERIALIZABLE. See
Section\ 4.6, \(lqSET TRANSACTION Syntax\(rq.
.TP 3n
\(bu
\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR,
\fB\-t \fR\fB\fIpath\fR\fR
.sp
The path of the directory to use for creating temporary files. It might be useful if your default
/tmp
directory resides on a partition that is too small to hold temporary tables. This option accepts several paths that are used in round\-robin fashion. Paths should be separated by colon characters (\(oq:\(cq) on Unix and semicolon characters (\(oq;\(cq) on Windows, NetWare, and OS/2. If the MySQL server is acting as a replication slave, you should not set
\fB\-\-tmpdir\fR
to point to a directory on a memory\-based filesystem or to a directory that is cleared when the server host restarts. For more information about the storage location of temporary files, see
Section\ 1.4.4, \(lqWhere MySQL Stores Temporary Files\(rq. A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables or
LOAD DATA INFILE
operations. If files in the temporary file directory are lost when the server restarts, replication fails.
.TP 3n
\(bu
\fB\-\-user={\fR\fB\fIuser_name\fR\fR\fB|\fR\fB\fIuser_id\fR\fR\fB}\fR,
\fB\-u {\fR\fB\fIuser_name\fR\fR\fB|\fR\fB\fIuser_id\fR\fR\fB}\fR
.sp
Run the
\fBmysqld\fR
server as the user having the name
\fIuser_name\fR
or the numeric user ID
\fIuser_id\fR. (\(lqUser\(rq
in this context refers to a system login account, not a MySQL user listed in the grant tables.)
.sp
This option is
\fImandatory\fR
when starting
\fBmysqld\fR
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\ 4.1, \(lqGeneral Security Guidelines\(rq.
.sp
To avoid a possible security hole where a user adds a
\fB\-\-user=root\fR
option to a
\fImy.cnf\fR
file (thus causing the server to run as
root),
\fBmysqld\fR
uses only the first
\fB\-\-user\fR
option specified and produces a warning if there are multiple
\fB\-\-user\fR
options. Options in
\fI/etc/my.cnf\fR
and
\fI$MYSQL_HOME/my.cnf\fR
are processed before command\-line options, so it is recommended that you put a
\fB\-\-user\fR
option in
\fI/etc/my.cnf\fR
and specify a value other than
root. The option in
\fI/etc/my.cnf\fR
is found before any other
\fB\-\-user\fR
options, which ensures that the server runs as a user other than
root, and that a warning results if any other
\fB\-\-user\fR
option is found.
.TP 3n
\(bu
\fB\-\-version\fR,
\fB\-V\fR
.sp
Display version information and exit.
.sp
.RE
.PP
You can assign a value to a server system variable by using an option of the form
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR. For example,
\fB\-\-key_buffer_size=32M\fR
sets the
key_buffer_size
variable to a value of 32MB.
.PP
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 allowable value if only certain values are allowed.
.PP
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
\fB\-\-maximum\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
command\-line option.
.PP
It is also possible to set variables by using
\fB\-\-set\-variable=\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
or
\fB\-O \fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
syntax.
\fIThis syntax is deprecated\fR.
.PP
You can change the values of most system variables for a running server with the
SET
statement. See
Section\ 5.3, \(lqSET Syntax\(rq.
.PP
the section called \(lqSYSTEM VARIABLES\(rq, provides a full description for all variables, and additional information for setting them at server startup and runtime.
Section\ 5.2, \(lqTuning Server Parameters\(rq, includes information on optimizing the server by tuning system variables.
.SH "SYSTEM VARIABLES"
.PP
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.
.PP
There are several ways to see the names and values of system variables:
.TP 3n
\(bu
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:
.sp
.RS 3n
.nf
mysqld \-\-verbose \-\-help
.fi
.RE
.TP 3n
\(bu
To see the values that a server will use based on its compiled\-in defaults, ignoring the settings in any option files, use this command:
.sp
.RS 3n
.nf
mysqld \-\-no\-defaults \-\-verbose \-\-help
.fi
.RE
.TP 3n
\(bu
To see the current values used by a running server, use the
SHOW VARIABLES
statement.
.sp
.RE
.PP
This section provides a description of each system variable. Variables with no version indicated are present in all MySQL 5.1 releases. For historical information concerning their implementation, please see
MySQL 5.0 Reference Manual
and
MySQL 3.23, 4.0, 4.1 Reference Manual.
.PP
The following table lists all available system variables:
.TS
allbox tab(:);
lB cB cB cB cB cB cB.
T{
\fBName\fR
T}:T{
\fBCmd\-line\fR
T}:T{
\fBOption file\fR
T}:T{
\fBSystem Var\fR
T}:T{
\fBStatus Var\fR
T}:T{
\fBVar Scope\fR
T}:T{
\fBDynamic\fR
T}
.T&
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c
l c c c c c c.
T{
auto\-increment\-increment
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: big_tables
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_file_per_table
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_flush_log_at_trx_commit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
innodb_flush_method
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_force_recovery
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_lock_wait_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_locks_unsafe_for_binlog
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_log_arch_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_log_archive
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_log_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_log_file_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
binlog_cache_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_log_files_in_group
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_log_group_home_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_max_dirty_pages_pct
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_max_purge_lag
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_mirrored_log_groups
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_open_files
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_rollback_on_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_stats_on_metadata
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
innodb_status_file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_support_xa
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
binlog_format
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_sync_spin_loops
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_table_locks
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_thread_concurrency
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
innodb_thread_sleep_delay
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
insert_id
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
interactive_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
join_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
keep_files_on_create
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
key_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
key_cache_age_threshold
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
bulk_insert_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
key_cache_block_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
key_cache_division_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
language
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
large\-pages
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: large_pages
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
last_insert_id
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
lc_time_names
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
license
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
local\-infile
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
\- \fIVariable\fR: local_infile
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
character\-set\-filesystem
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-bin
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: log_bin
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-bin\-index
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-bin\-trust\-function\-creators
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: log_bin_trust_function_creators
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
log\-error
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: log_error
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-isam
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-queries\-not\-using\-indexes
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: character_set_filesystem
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: log_queries_not_using_indexes
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
log\-slave\-updates
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: log_slave_updates
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-slow\-queries
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: log_slow_queries
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
log\-warnings
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: log_warnings
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
log_output
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
long_query_time
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
low\-priority\-updates
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
character\-set\-server
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: low_priority_updates
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
lower_case_file_system
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
lower_case_table_names
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
master\-connect\-retry
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
Master_Log_File
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
Master_SSL_Allowed
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
Master_SSL_CA_File
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
Master_SSL_CA_Path
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
max_allowed_packet
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_binlog_cache_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
\- \fIVariable\fR: character_set_server
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_binlog_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_connect_errors
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_connections
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_delayed_threads
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_error_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_heap_table_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_insert_delayed_threads
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_join_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_length_for_sort_data
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_prepared_stmt_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
character\-sets\-dir
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
max_relay_log_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_seeks_for_key
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_sort_length
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_sp_recursion_depth
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
max_tmp_tables
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_user_connections
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
max_write_lock_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
memlock
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: locked_in_memory
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
merge
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: character_sets_dir
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
multi_range_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
multi_read_range
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam\-recover
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
myisam_block_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam_data_pointer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
myisam_max_sort_file_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam_repair_threads
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam_sort_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam_stats_method
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
myisam_use_mmap
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
\- \fIVariable\fR: auto_increment_increment
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
character_set_client
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ndb_autoincrement_prefetch_sz
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ndb_cache_check_time
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ndb_cluster_connection_pool
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
ndb_extra_logging
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
ndb_force_send
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ndb_use_copying_alter_table
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
ndb_use_exact_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ndb_wait_connected
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
ndbcluster
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
net_buffer_length
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
character_set_connection
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
net_read_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
net_retry_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
net_write_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
new
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
old
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
old\-passwords
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: old_passwords
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
open_files_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
optimizer_prune_level
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
optimizer_search_depth
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
character_set_database
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
pid\-file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin\-innodb\-doublewrite
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: plugin_innodb_doublewrite
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
plugin_innodb_additional_mem_pool_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_autoextend_increment
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_buffer_pool_awe_mem_mb
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: innodb_buffer_pool_awe_mem_mb
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_buffer_pool_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_checksums
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
character_set_results
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_commit_concurrency
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_concurrency_tickets
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_data_file_path
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_data_home_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_fast_shutdown
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_file_io_threads
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_file_per_table
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_flush_log_at_trx_commit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
plugin_innodb_flush_method
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_force_recovery
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
character_set_system
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_lock_wait_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_locks_unsafe_for_binlog
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_log_archive
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_log_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_log_file_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_log_files_in_group
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_log_group_home_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_max_dirty_pages_pct
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_max_purge_lag
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_mirrored_log_groups
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
collation_connection
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_open_files
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
plugin_innodb_rollback_on_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
plugin_innodb_stats_on_metadata
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
plugin_innodb_status_file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
plugin_innodb_support_xa
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_sync_spin_loops
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: innodb_sync_spin_loops
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_table_locks
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_thread_concurrency
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
plugin_innodb_thread_sleep_delay
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
collation_database
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
port
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
preload_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
prepared_stmt_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
both
T}:T{
no
T}
T{
protocol_version
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
query_alloc_block_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_cache_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_cache_min_res_unit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_cache_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_cache_type
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_cache_wlock_invalidate
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
collation_server
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
query_prealloc_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
range_alloc_block_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
read_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
read_only
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
read_rnd_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
relay\-log
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
Relay_Log_File
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
relay_log_purge
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
relay_log_space_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
Relay_Master_Log_File
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
completion_type
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
report\-password
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
rpl_recovery_rank
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
secure\-auth
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: secure_auth
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
secure\-file\-priv
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
\- \fIVariable\fR: secure_file_priv
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
server\-id
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: server_id
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
skip\-external\-locking
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
\- \fIVariable\fR: skip_external_locking
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
concurrent\-insert
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
skip\-log\-warnings
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
skip\-merge
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
skip\-networking
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: skip_networking
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
skip\-new
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
skip\-show\-database
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: skip_show_database
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
slave\-allow\-batching
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
slave\-load\-tmpdir
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: slave_load_tmpdir
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
auto\-increment\-offset
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: concurrent_insert
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
slave\-net\-timeout
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
\- \fIVariable\fR: slave_net_timeout
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
slave\-skip\-errors
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: slave_skip_errors
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
slave_compressed_protocol
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
slave_transaction_retries
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
slow_launch_time
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
slow_query_log_file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
socket
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
sort_buffer_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
connect_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sql\-mode
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: sql_mode
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sql_auto_is_null
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
no
T}
T{
sql_big_selects
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sql_big_tables
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_buffer_result
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_log_bin
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_log_off
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_log_update
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_low_priority_updates
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
datadir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
sql_max_join_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sql_notes
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sql_quote_show_create
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_safe_updates
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_select_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
sql_slave_skip_counter
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
sql_warnings
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ssl
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
ssl\-ca
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: ssl_ca
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
date_format
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ssl\-capath
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: ssl_capath
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
ssl\-cert
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: ssl_cert
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
ssl\-cipher
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: ssl_cipher
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
ssl\-key
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: ssl_key
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
storage_engine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
sync\-binlog
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
datetime_format
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: sync_binlog
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
sync\-frm
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: sync_frm
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
system_time_zone
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
table_cache
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
table_definition_cache
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
table_lock_wait_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
table_open_cache
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
table_type
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
thread_cache_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
default_week_format
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
thread_concurrency
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
thread_handling
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
thread_stack
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
time_format
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
time_zone
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
timed_mutexes
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
timestamp
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
tmp_table_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
tmpdir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
transaction_alloc_block_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
delay\-key\-write
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
transaction_prealloc_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
tx_isolation
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
unique_checks
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
updatable_views_with_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
version
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
version_comment
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
version_compile_machine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
version_compile_os
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
wait_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
warning_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
no
T}
T{
\- \fIVariable\fR: delay_key_write
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
delayed_insert_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
delayed_insert_timeout
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: auto_increment_offset
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
delayed_queue_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
des\-key\-file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
div_precision_increment
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
engine\-condition\-pushdown
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
\- \fIVariable\fR: engine_condition_pushdown
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
error_count
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
no
T}
T{
event\-scheduler
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
\- \fIVariable\fR: event_scheduler
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
no
T}
T{
expire_logs_days
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
flush
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
autocommit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
flush_time
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
foreign_key_checks
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
ft_boolean_syntax
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ft_max_word_len
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ft_min_word_len
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
ft_query_expansion_limit
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
ft_stopword_file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
general\-log
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
\- \fIVariable\fR: general_log
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
general_log_file
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
automatic_sp_privileges
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
group_concat_max_len
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
have_archive
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_blackhole_engine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_compress
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_crypt
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_csv
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_dynamic_loading
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_example_engine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_federated_engine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_geometry
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
back_log
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
have_innodb
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_isam
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_merge_engine
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_ndbcluster
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_openssl
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_partitioning
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_query_cache
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_raid
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_row_based_replication
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
have_rtree_keys
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
basedir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
have_symlink
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
hostname
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
identity
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
session
T}:T{
yes
T}
T{
init\-file
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
\- \fIVariable\fR: init_file
T}:T{
\
T}:T{
\
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
init_connect
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
no
T}
T{
init_slave
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_additional_mem_pool_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_autoextend_increment
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_autoinc_lock_mode
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
global
T}:T{
yes
T}
T{
big\-tables
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_buffer_pool_awe_mem_mb
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_buffer_pool_size
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_checksums
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_commit_concurrency
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_concurrency_tickets
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
yes
T}
T{
innodb_data_file_path
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_data_home_dir
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_doublewrite
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_fast_shutdown
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
T{
innodb_file_io_threads
T}:T{
Y
T}:T{
Y
T}:T{
Y
T}:T{
\
T}:T{
both
T}:T{
no
T}
.TE
.sp
.PP
For additional system variable information, see these sections:
.TP 3n
\(bu
the section called \(lqUSING SYSTEM VARIABLES\(rq, discusses the syntax for setting and displaying system variable values.
.TP 3n
\(bu
the section called \(lqDynamic System Variables\(rq, lists the variables that can be set at runtime.
.TP 3n
\(bu
Information on tuning system variables can be found in
Section\ 5.2, \(lqTuning Server Parameters\(rq.
.TP 3n
\(bu
Section\ 5.4, \(lqInnoDB Startup Options and System Variables\(rq, lists
InnoDB
system variables.
.sp
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
Some of the following variable descriptions refer to
\(lqenabling\(rq
or
\(lqdisabling\(rq
a variable. These variables can be enabled with the
SET
statement by setting them to
ON
or
1, or disabled by setting them to
OFF
or
0. However, to set such a variable on the command line or in an option file, you must set it to
1
or
0; setting it to
ON
or
OFF
will not work. For example, on the command line,
\fB\-\-delay_key_write=1\fR
works but
\fB\-\-delay_key_write=ON\fR
does not.
.PP
Values for buffer sizes, lengths, and stack sizes are given in bytes unless otherwise specified.
.TP 3n
\(bu
auto_increment_increment
.sp
auto_increment_increment
and
auto_increment_offset
are intended for use with master\-to\-master replication, and can be used to control the operation of
AUTO_INCREMENT
columns. Both variables can be set globally or locally, and each can assume an integer value between 1 and 65,535 inclusive. Setting the value of either of these two variables to 0 causes its value to be set to 1 instead. Attempting to set the value of either of these two variables to an integer greater than 65,535 or less than 0 causes its value to be set to 65,535 instead. Attempting to set the value of
auto_increment_increment
or
auto_increment_offset
to a non\-integer value gives rise to an error, and the actual value of the variable remains unchanged.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBImportant\fR
auto_increment_increment
and
auto_increment_offset
are not intended for use with MySQL Cluster replication. Attempting to set them in a Cluster replication scenario may give rise to unpredictable (and unrecoverable) errors. The use of these variables with Cluster replication is therefore not supported.
These two variables affect
AUTO_INCREMENT
column behavior as follows:
.RS 3n
.TP 3n
\(bu
auto_increment_increment
controls the interval between successive column values. For example:
.sp
.RS 3n
.nf
mysql> \fBSHOW VARIABLES LIKE 'auto_inc%';\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
2 rows in set (0.00 sec)
mysql> \fBCREATE TABLE autoinc1\fR
\-> \fB(col INT NOT NULL AUTO_INCREMENT PRIMARY KEY);\fR
Query OK, 0 rows affected (0.04 sec)
mysql> \fBSET @@auto_increment_increment=10;\fR
Query OK, 0 rows affected (0.00 sec)
mysql> \fBSHOW VARIABLES LIKE 'auto_inc%';\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| auto_increment_increment | 10 |
| auto_increment_offset | 1 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
2 rows in set (0.01 sec)
mysql> \fBINSERT INTO autoinc1 VALUES (NULL), (NULL), (NULL), (NULL);\fR
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> \fBSELECT col FROM autoinc1;\fR
+\-\-\-\-\-+
| col |
+\-\-\-\-\-+
| 1 |
| 11 |
| 21 |
| 31 |
+\-\-\-\-\-+
4 rows in set (0.00 sec)
.fi
.RE
(Note how
SHOW VARIABLES
is used here to obtain the current values for these variables.)
.TP 3n
\(bu
auto_increment_offset
determines the starting point for the
AUTO_INCREMENT
column value. Consider the following, assuming that these statements are executed during the same session as the example given in the description for
auto_increment_increment:
.sp
.RS 3n
.nf
mysql> \fBSET @@auto_increment_offset=5;\fR
Query OK, 0 rows affected (0.00 sec)
mysql> \fBSHOW VARIABLES LIKE 'auto_inc%';\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| auto_increment_increment | 10 |
| auto_increment_offset | 5 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
2 rows in set (0.00 sec)
mysql> \fBCREATE TABLE autoinc2\fR
\-> \fB(col INT NOT NULL AUTO_INCREMENT PRIMARY KEY);\fR
Query OK, 0 rows affected (0.06 sec)
mysql> \fBINSERT INTO autoinc2 VALUES (NULL), (NULL), (NULL), (NULL);\fR
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> \fBSELECT col FROM autoinc2;\fR
+\-\-\-\-\-+
| col |
+\-\-\-\-\-+
| 5 |
| 15 |
| 25 |
| 35 |
+\-\-\-\-\-+
4 rows in set (0.02 sec)
.fi
.RE
If the value of
auto_increment_offset
is greater than that of
auto_increment_increment, the value of
auto_increment_offset
is ignored.
.RE
.IP "" 3n
Should one or both of these variables be changed and then new rows inserted into a table containing an
AUTO_INCREMENT
column, the results may seem counterintuitive because the series of
AUTO_INCREMENT
values is calculated without regard to any values already present in the column, and the next value inserted is the least value in the series that is greater than the maximum existing value in the
AUTO_INCREMENT
column. In other words, the series is calculated like so:
.sp
auto_increment_offset + \fIN\fR \(mu auto_increment_increment
.sp
where
\fIN\fR
is a positive integer value in the series [1, 2, 3, ...]. For example:
.sp
.RS 3n
.nf
mysql> \fBSHOW VARIABLES LIKE 'auto_inc%';\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| auto_increment_increment | 10 |
| auto_increment_offset | 5 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
2 rows in set (0.00 sec)
mysql> \fBSELECT col FROM autoinc1;\fR
+\-\-\-\-\-+
| col |
+\-\-\-\-\-+
| 1 |
| 11 |
| 21 |
| 31 |
+\-\-\-\-\-+
4 rows in set (0.00 sec)
mysql> \fBINSERT INTO autoinc1 VALUES (NULL), (NULL), (NULL), (NULL);\fR
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> \fBSELECT col FROM autoinc1;\fR
+\-\-\-\-\-+
| col |
+\-\-\-\-\-+
| 1 |
| 11 |
| 21 |
| 31 |
| 35 |
| 45 |
| 55 |
| 65 |
+\-\-\-\-\-+
8 rows in set (0.00 sec)
.fi
.RE
The values shown for
auto_increment_increment
and
auto_increment_offset
generate the series 5 +
\fIN\fR
\(mu 10, that is, [5, 15, 25, 35, 45, ...]. The greatest value present in the
col
column prior to the
INSERT
is 31, and the next available value in the
AUTO_INCREMENT
series is 35, so the inserted values for
col
begin at that point and the results are as shown for the
SELECT
query.
.sp
It is important to remember that it is not possible to confine the effects of these two variables to a single table, and thus they do not take the place of the sequences offered by some other database management systems; these variables control the behavior of all
AUTO_INCREMENT
columns in
\fIall\fR
tables on the MySQL server. If one of these variables is set globally, its effects persist until the global value is changed or overridden by setting them locally, or until
\fBmysqld\fR
is restarted. If set locally, the new value affects
AUTO_INCREMENT
columns for all tables into which new rows are inserted by the current user for the duration of the session, unless the values are changed during that session.
.sp
The default value of
auto_increment_increment
is 1. See
[3]\&\fIAuto\-Increment in Multiple\-Master Replication\fR.
.sp
auto_increment_increment
is supported for use with
NDB
tables beginning with MySQL 5.1.20. Previously, setting it when using MySQL Cluster tables or MySQL Cluster Replication produced unpredictable results.
.TP 3n
\(bu
auto_increment_offset
.sp
This variable has a default value of 1. For particulars, see the description for
auto_increment_increment.
.sp
auto_increment_offset
is supported for use with
NDB
tables beginning with MySQL 5.1.20. Previously, setting it when using MySQL Cluster tables or MySQL Cluster Replication produced unpredictable results.
.TP 3n
\(bu
automatic_sp_privileges
.sp
When this variable has a value of 1 (the default), the server automatically grants the
EXECUTE
and
ALTER ROUTINE
privileges to the creator of a stored routine, if the user cannot already execute and alter or drop the routine. (The
ALTER ROUTINE
privileges is required to drop the routine.) The server also automatically drops those privileges when the creator drops the routine. If
automatic_sp_privileges
is 0, the server does not automatically add and drop these privileges.
.TP 3n
\(bu
back_log
.sp
The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time. It then takes some time (although very little) for the main thread to check the connection and start a new thread. The
back_log
value indicates how many requests can be stacked during this short time before MySQL momentarily stops answering new requests. You need to increase this only if you expect a large number of connections in a short period of time.
.sp
In other words, this value is the size of the listen queue for incoming TCP/IP connections. Your operating system has its own limit on the size of this queue. The manual page for the Unix
listen()
system call should have more details. Check your OS documentation for the maximum value for this variable.
back_log
cannot be set higher than your operating system limit.
.TP 3n
\(bu
basedir
.sp
The MySQL installation base directory. This variable can be set with the
\fB\-\-basedir\fR
option.
.TP 3n
\(bu
binlog_cache_size
.sp
The size of the cache to hold the SQL statements for the binary log during a transaction. A binary log cache is allocated for each client if the server supports any transactional storage engines and if the server has the binary log enabled (\fB\-\-log\-bin\fR
option). If you often use large, multiple\-statement transactions, you can increase this cache size to get more performance. The
Binlog_cache_use
and
Binlog_cache_disk_use
status variables can be useful for tuning the size of this variable. See
Section\ 9.4, \(lqThe Binary Log\(rq.
.TP 3n
\(bu
binlog_format
.sp
The binary logging format, either
STATEMENT,
ROW, or
MIXED.
binlog_format
is set by the
\fB\-\-binlog\-format\fR
option at startup, or by the
binlog_format
variable at runtime (you need the
SUPER
privilege to set this variable on a global scope). See
Section\ 1.2, \(lqReplication Formats\(rq. The startup variable was added in MySQL 5.1.5, and the runtime variable in MySQL 5.1.8.
MIXED
was added in MySQL 5.1.8.
.sp
STATEMENT
is used by default. If
MIXED
is specified, statement\-based replication is used, too, except for cases where only row\-based replication is guaranteed to lead to proper results. For example, this is the case when statements contain user\-defined functions (UDF) or the
UUID()
function. An exception to this rule is that
MIXED
always uses statement\-based replication for stored functions and triggers.
.sp
There are exceptions when you cannot switch the replication format at runtime:
.RS 3n
.TP 3n
\(bu
From within a stored function or a trigger.
.TP 3n
\(bu
If
NDB
is enabled.
.TP 3n
\(bu
If the session is currently in row\-based replication mode and has open temporary tables.
.RE
.IP "" 3n
Trying to switch the format in those cases results in an error.
.sp
Before MySQL 5.1.8, switching to row\-based replication format would implicitly set
\fB\-\-log\-bin\-trust\-function\-creators=1\fR
and
\fB\-\-innodb_locks_unsafe_for_binlog\fR. MySQL 5.1.8 and later no longer implicitly set these options when row\-based replication is used.
.TP 3n
\(bu
bulk_insert_buffer_size
.sp
MyISAM
uses a special tree\-like cache to make bulk inserts faster for
INSERT ... SELECT,
INSERT ... VALUES (...), (...), ..., and
LOAD DATA INFILE
when adding data to non\-empty tables. This variable limits the size of the cache tree in bytes per thread. Setting it to 0 disables this optimization. The default value is 8MB.
.TP 3n
\(bu
character_set_client
.sp
The character set for statements that arrive from the client.
.TP 3n
\(bu
character_set_connection
.sp
The character set used for literals that do not have a character set introducer and for number\-to\-string conversion.
.TP 3n
\(bu
character_set_database
.sp
The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as
character_set_server.
.TP 3n
\(bu
character_set_filesystem
.sp
The filesystem character set. This variable is used to interpret string literals that refer to filenames, such as in the
LOAD DATA INFILE
and
SELECT ... INTO OUTFILE
statements and the
LOAD_FILE()
function. Such filenames are converted from
character_set_client
to
character_set_filesystem
before the file opening attempt occurs. The default value is
binary, which means that no conversion occurs. For systems on which multi\-byte filenames are allowed, a different value may be more appropriate. For example, if the system represents filenames using UTF\-8, set
character_set_filesystem
to
\'utf8'. This variable was added in MySQL 5.1.6.
.TP 3n
\(bu
character_set_results
.sp
The character set used for returning query results to the client.
.TP 3n
\(bu
character_set_server
.sp
The server's default character set.
.TP 3n
\(bu
character_set_system
.sp
The character set used by the server for storing identifiers. The value is always
utf8.
.TP 3n
\(bu
character_sets_dir
.sp
The directory where character sets are installed.
.TP 3n
\(bu
collation_connection
.sp
The collation of the connection character set.
.TP 3n
\(bu
collation_database
.sp
The collation used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as
collation_server.
.TP 3n
\(bu
collation_server
.sp
The server's default collation.
.TP 3n
\(bu
completion_type
.sp
The transaction completion type:
.RS 3n
.TP 3n
\(bu
If the value is 0 (the default),
COMMIT
and
ROLLBACK
are unaffected.
.TP 3n
\(bu
If the value is 1,
COMMIT
and
ROLLBACK
are equivalent to
COMMIT AND CHAIN
and
ROLLBACK AND CHAIN, respectively. (A new transaction starts immediately with the same isolation level as the just\-terminated transaction.)
.TP 3n
\(bu
If the value is 2,
COMMIT
and
ROLLBACK
are equivalent to
COMMIT RELEASE
and
ROLLBACK RELEASE, respectively. (The server disconnects after terminating the transaction.)
.RE
.TP 3n
\(bu
concurrent_insert
.sp
If 1 (the default), MySQL allows
INSERT
and
SELECT
statements to run concurrently for
MyISAM
tables that have no free blocks in the middle of the data file. You can turn this option off by starting
\fBmysqld\fR
with
\fB\-\-safe\fR
or
\fB\-\-skip\-new\fR.
.sp
This variable can take three integer values:
.TS
allbox tab(:);
l l
l l
l l
l l.
T{
\fBValue\fR
T}:T{
\fBDescription\fR
T}
T{
0
T}:T{
Off
T}
T{
1
T}:T{
(Default) Enables concurrent insert for MyISAM tables
that don't have holes
T}
T{
2
T}:T{
Enables concurrent inserts for all MyISAM tables,
even those that have holes. For a table with a
hole, new rows are inserted at the end of the
table if it is in use by another thread.
Otherwise, MySQL acquires a normal write lock and
inserts the row into the hole.
T}
.TE
.sp
See also
Section\ 3.3, \(lqConcurrent Inserts\(rq.
.TP 3n
\(bu
connect_timeout
.sp
The number of seconds that the
\fBmysqld\fR
server waits for a connect packet before responding with
Bad handshake.
.TP 3n
\(bu
datadir
.sp
The MySQL data directory. This variable can be set with the
\fB\-\-datadir\fR
option.
.TP 3n
\(bu
date_format
.sp
This variable is not implemented.
.TP 3n
\(bu
datetime_format
.sp
This variable is not implemented.
.TP 3n
\(bu
default_week_format
.sp
The default mode value to use for the
WEEK()
function. See
Section\ 6, \(lqDate and Time Functions\(rq.
.TP 3n
\(bu
delay_key_write
.sp
This option applies only to
MyISAM
tables. It can have one of the following values to affect handling of the
DELAY_KEY_WRITE
table option that can be used in
CREATE TABLE
statements.
.TS
allbox tab(:);
l l
l l
l l
l l.
T{
\fBOption\fR
T}:T{
\fBDescription\fR
T}
T{
OFF
T}:T{
DELAY_KEY_WRITE is ignored.
T}
T{
ON
T}:T{
MySQL honors any DELAY_KEY_WRITE option specified in
CREATE TABLE statements. This
is the default value.
T}
T{
ALL
T}:T{
All new opened tables are treated as if they were created with the
DELAY_KEY_WRITE option enabled.
T}
.TE
.sp
If
DELAY_KEY_WRITE
is enabled for a table, the key buffer is not flushed for the table on every index update, but only when the table is closed. This speeds up writes on keys a lot, but if you use this feature, you should add automatic checking of all
MyISAM
tables by starting the server with the
\fB\-\-myisam\-recover\fR
option (for example,
\fB\-\-myisam\-recover=BACKUP,FORCE\fR). See
the section called \(lqCOMMAND OPTIONS\(rq, and
Section\ 4.1, \(lqMyISAM Startup Options\(rq.
.sp
Note that if you enable external locking with
\fB\-\-external\-locking\fR, there is no protection against index corruption for tables that use delayed key writes.
.TP 3n
\(bu
delayed_insert_limit
.sp
After inserting
delayed_insert_limit
delayed rows, the
INSERT DELAYED
handler thread checks whether there are any
SELECT
statements pending. If so, it allows them to execute before continuing to insert delayed rows.
.TP 3n
\(bu
delayed_insert_timeout
.sp
How many seconds an
INSERT DELAYED
handler thread should wait for
INSERT
statements before terminating.
.TP 3n
\(bu
delayed_queue_size
.sp
This is a per\-table limit on the number of rows to queue when handling
INSERT DELAYED
statements. If the queue becomes full, any client that issues an
INSERT DELAYED
statement waits until there is room in the queue again.
.TP 3n
\(bu
div_precision_increment
.sp
This variable indicates the number of digits of precision by which to increase the result of division operations performed with the
/
operator. The default value is 4. The minimum and maximum values are 0 and 30, respectively. The following example illustrates the effect of increasing the default value.
.sp
.RS 3n
.nf
mysql> \fBSELECT 1/7;\fR
+\-\-\-\-\-\-\-\-+
| 1/7 |
+\-\-\-\-\-\-\-\-+
| 0.1429 |
+\-\-\-\-\-\-\-\-+
mysql> \fBSET div_precision_increment = 12;\fR
mysql> \fBSELECT 1/7;\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| 1/7 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| 0.142857142857 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.RE
.TP 3n
\(bu
event_scheduler
.sp
This variable indicates the status of the Event Scheduler; as of MySQL 5.1.12, possible values are
ON,
OFF, and
DISABLED, with the default being
OFF. This variable and its effects on the Event Scheduler's operation are discussed in greater detail in the
Overview section of the Events chapter.
.sp
This variable was added in MySQL 5.1.6.
.TP 3n
\(bu
engine_condition_pushdown
.sp
This variable applies to NDB. By default it is 0 (OFF): If you execute a query such as
SELECT * FROM t WHERE mycol = 42, where
mycol
is a non\-indexed column, the query is executed as a full table scan on every NDB node. Each node sends every row to the MySQL server, which applies the
WHERE
condition. If
engine_condition_pushdown
is set to 1 (ON), the condition is
\(lqpushed down\(rq
to the storage engine and sent to the NDB nodes. Each node uses the condition to perform the scan, and only sends back to the MySQL server the rows that match the condition.
.TP 3n
\(bu
expire_logs_days
.sp
The number of days for automatic binary log removal. The default is 0, which means
\(lqno automatic removal.\(rq
Possible removals happen at startup and at binary log rotation.
.TP 3n
\(bu
flush
.sp
If
ON, the server flushes (synchronizes) all changes to disk after each SQL statement. Normally, MySQL does a write of all changes to disk only after each SQL statement and lets the operating system handle the synchronizing to disk. See
Section\ 1.4.2, \(lqWhat to Do If MySQL Keeps Crashing\(rq. This variable is set to
ON
if you start
\fBmysqld\fR
with the
\fB\-\-flush\fR
option.
.TP 3n
\(bu
flush_time
.sp
If this is set to a non\-zero value, all tables are closed every
flush_time
seconds to free up resources and synchronize unflushed data to disk. We recommend that this option be used only on Windows 9x or Me, or on systems with minimal resources.
.TP 3n
\(bu
ft_boolean_syntax
.sp
The list of operators supported by boolean full\-text searches performed using
IN BOOLEAN MODE. See
Section\ 8.1, \(lqBoolean Full\-Text Searches\(rq.
.sp
The default variable value is
\'+\ \-><()~*:""&|'. The rules for changing the value are as follows:
.RS 3n
.TP 3n
\(bu
Operator function is determined by position within the string.
.TP 3n
\(bu
The replacement value must be 14 characters.
.TP 3n
\(bu
Each character must be an ASCII non\-alphanumeric character.
.TP 3n
\(bu
Either the first or second character must be a space.
.TP 3n
\(bu
No duplicates are allowed except the phrase quoting operators in positions 11 and 12. These two characters are not required to be the same, but they are the only two that may be.
.TP 3n
\(bu
Positions 10, 13, and 14 (which by default are set to \(oq:\(cq, \(oq&\(cq, and \(oq|\(cq) are reserved for future extensions.
.RE
.TP 3n
\(bu
ft_max_word_len
.sp
The maximum length of the word to be included in a
FULLTEXT
index.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
FULLTEXT
indexes must be rebuilt after changing this variable. Use
REPAIR TABLE \fItbl_name\fR QUICK.
.TP 3n
\(bu
ft_min_word_len
.sp
The minimum length of the word to be included in a
FULLTEXT
index.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
FULLTEXT
indexes must be rebuilt after changing this variable. Use
REPAIR TABLE \fItbl_name\fR QUICK.
.TP 3n
\(bu
ft_query_expansion_limit
.sp
The number of top matches to use for full\-text searches performed using
WITH QUERY EXPANSION.
.TP 3n
\(bu
ft_stopword_file
.sp
The file from which to read the list of stopwords for full\-text searches. All the words from the file are used; comments are
\fInot\fR
honored. By default, a built\-in list of stopwords is used (as defined in the
\fIstorage/myisam/ft_static.c\fR
file). Setting this variable to the empty string ('') disables stopword filtering.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
FULLTEXT
indexes must be rebuilt after changing this variable or the contents of the stopword file. Use
REPAIR TABLE \fItbl_name\fR QUICK.
.TP 3n
\(bu
general_log
.sp
Whether the general query log is enabled. The value can be 0 (or
OFF) to disable the log or 1 (or
ON) to enable the log. The default value depends on whether the
\fB\-\-log\fR
option is given. The destination for log output is controlled by the
log_output
system variable; if that value is
NONE, no log entries are written even if the log is enabled. The
general_log
variable was added in MySQL 5.1.12.
.TP 3n
\(bu
general_log_file
.sp
The name of the general query log file. The default value is
\fI\fIhost_name\fR\fR\fI.log\fR, but the initial value can be changed with the
\fB\-\-log\fR
option. This variable was added in MySQL 5.1.12.
.TP 3n
\(bu
group_concat_max_len
.sp
The maximum allowed result length for the
GROUP_CONCAT()
function. The default is 1024.
.TP 3n
\(bu
have_archive
.sp
YES
if
\fBmysqld\fR
supports
ARCHIVE
tables,
NO
if not.
.TP 3n
\(bu
have_blackhole_engine
.sp
YES
if
\fBmysqld\fR
supports
BLACKHOLE
tables,
NO
if not.
.TP 3n
\(bu
have_compress
.sp
YES
if the
zlib
compression library is available to the server,
NO
if not. If not, the
COMPRESS()
and
UNCOMPRESS()
functions cannot be used.
.TP 3n
\(bu
have_crypt
.sp
YES
if the
crypt()
system call is available to the server,
NO
if not. If not, the
ENCRYPT()
function cannot be used.
.TP 3n
\(bu
have_csv
.sp
YES
if
\fBmysqld\fR
supports
ARCHIVE
tables,
NO
if not.
.TP 3n
\(bu
have_dynamic_loading
.sp
YES
if
\fBmysqld\fR
supports dynamic loading of plugins,
NO
if not. This variable was added in MySQL 5.1.10.
.TP 3n
\(bu
have_example_engine
.sp
YES
if
\fBmysqld\fR
supports
EXAMPLE
tables,
NO
if not.
.sp
have_federated_engine
.sp
YES
if
\fBmysqld\fR
supports
FEDERATED
tables,
NO
if not.
.TP 3n
\(bu
have_geometry
.sp
YES
if the server supports spatial data types,
NO
if not.
.TP 3n
\(bu
have_innodb
.sp
YES
if
\fBmysqld\fR
supports
InnoDB
tables.
DISABLED
if
\fB\-\-skip\-innodb\fR
is used.
.TP 3n
\(bu
have_ndbcluster
.sp
YES
if
\fBmysqld\fR
supports
NDB Cluster
tables.
DISABLED
if
\fB\-\-skip\-ndbcluster\fR
is used.
.TP 3n
\(bu
have_partitioning
.sp
YES
if
\fBmysqld\fR
supports partitioning. Added in MySQL 5.1.1 as
have_partition_engine
and renamed to
have_partioning
in 5.1.6.
.TP 3n
\(bu
have_openssl
.sp
YES
if
\fBmysqld\fR
supports SSL connections,
NO
if not.
.TP 3n
\(bu
have_query_cache
.sp
YES
if
\fBmysqld\fR
supports the query cache,
NO
if not.
.TP 3n
\(bu
have_row_based_replication
.sp
YES
if the server can perform replication using row\-based binary logging. If the value is
NO, the server can use only statement\-based logging. See
Section\ 1.2, \(lqReplication Formats\(rq. This variable was added in MySQL 5.1.5. This variable was removed in 5.1.15.
.TP 3n
\(bu
have_rtree_keys
.sp
YES
if
RTREE
indexes are available,
NO
if not. (These are used for spatial indexes in
MyISAM
tables.)
.TP 3n
\(bu
have_symlink
.sp
YES
if symbolic link support is enabled,
NO
if not. This is required on Unix for support of the
DATA DIRECTORY
and
INDEX DIRECTORY
table options, and on Windows for support of data directory symlinks.
.TP 3n
\(bu
hostname
.sp
The server sets this variable to the server hostname at startup. This variable was added in MySQL 5.1.17.
.TP 3n
\(bu
init_connect
.sp
A string to be executed by the server for each client that connects. The string consists of one or more SQL statements. To specify multiple statements, separate them by semicolon characters. For example, each client begins by default with autocommit mode enabled. There is no global system variable to specify that autocommit should be disabled by default, but
init_connect
can be used to achieve the same effect:
.sp
.RS 3n
.nf
SET GLOBAL init_connect='SET AUTOCOMMIT=0';
.fi
.RE
This variable can also be set on the command line or in an option file. To set the variable as just shown using an option file, include these lines:
.sp
.RS 3n
.nf
[mysqld]
init_connect='SET AUTOCOMMIT=0'
.fi
.RE
Note that the content of
init_connect
is not executed for users that have the
SUPER
privilege. This is done so that an erroneous value for
init_connect
does not prevent all clients from connecting. For example, the value might contain a statement that has a syntax error, thus causing client connections to fail. Not executing
init_connect
for users that have the
SUPER
privilege enables them to open a connection and fix the
init_connect
value.
.TP 3n
\(bu
init_file
.sp
The name of the file specified with the
\fB\-\-init\-file\fR
option when you start the server. This should be a file containing SQL statements that you want the server to execute when it starts. Each statement must be on a single line and should not include comments.
.sp
Note that the
\fB\-\-init\-file\fR
option is unavailable if MySQL was configured with the
\fB\-\-disable\-grant\-options\fR
option. See
Section\ 9.2, \(lqTypical \fBconfigure\fR Options\(rq.
.TP 3n
\(bu
init_slave
.sp
This variable is similar to
init_connect, but is a string to be executed by a slave server each time the SQL thread starts. The format of the string is the same as for the
init_connect
variable.
.TP 3n
\(bu
innodb_\fIxxx\fR
.sp
InnoDB
system variables are listed in
Section\ 5.4, \(lqInnoDB Startup Options and System Variables\(rq.
.TP 3n
\(bu
interactive_timeout
.sp
The number of seconds the server waits for activity on an interactive connection before closing it. An interactive client is defined as a client that uses the
CLIENT_INTERACTIVE
option to
mysql_real_connect(). See also
wait_timeout.
.TP 3n
\(bu
join_buffer_size
.sp
The size of the buffer that is used for joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of
join_buffer_size
to get a faster full join when adding indexes is not possible. One join buffer is allocated for each full join between two tables. For a complex join between several tables for which indexes are not used, multiple join buffers might be necessary.
.TP 3n
\(bu
keep_files_on_create
.sp
If a
MyISAM
table is created with no
DATA DIRECTORY
option, the
\fI.MYD\fR
file is created in the database directory. By default, if
MyISAM
finds an existing
\fI.MYD\fR
file in this case, it overwrites it. The same applies to
\fI.MYI\fR
files for tables created with no
INDEX DIRECTORY
option. To suppress this behavior, set the
keep_files_on_create
variable to
ON
(1), in which case
MyISAM
will not overwrite existing files and returns an error instead. The default value is
OFF
(0).
.sp
If a
MyISAM
table is created with a
DATA DIRECTORY
or
INDEX DIRECTORY
option and an existing
\fI.MYD\fR
or
\fI.MYI\fR
file is found, MyISAM always returns an error. It will not overwrite a file in the specified directory.
.sp
This variable was added in MySQL 5.1.23.
.TP 3n
\(bu
key_buffer_size
.sp
Index blocks for
MyISAM
tables are buffered and are shared by all threads.
key_buffer_size
is the size of the buffer used for index blocks. The key buffer is also known as the key cache.
.sp
The maximum allowable setting for
key_buffer_size
is 4GB. The effective maximum size might be less, depending on your available physical RAM and per\-process RAM limits imposed by your operating system or hardware platform.
.sp
Increase the value to get better index handling (for all reads and multiple writes) to as much as you can afford. Using a value that is 25% of total memory on a machine that mainly runs MySQL is quite common. However, if you make the value too large (for example, more than 50% of your total memory) your system might start to page and become extremely slow. MySQL relies on the operating system to perform filesystem caching for data reads, so you must leave some room for the filesystem cache. Consider also the memory requirements of other storage engines.
.sp
For even more speed when writing many rows at the same time, use
LOCK TABLES. See
Section\ 2.17, \(lqSpeed of INSERT Statements\(rq.
.sp
You can check the performance of the key buffer by issuing a
SHOW STATUS
statement and examining the
Key_read_requests,
Key_reads,
Key_write_requests, and
Key_writes
status variables. (See
Section\ 5.4, \(lqSHOW Syntax\(rq.) The
Key_reads/Key_read_requests
ratio should normally be less than 0.01. The
Key_writes/Key_write_requests
ratio is usually near 1 if you are using mostly updates and deletes, but might be much smaller if you tend to do updates that affect many rows at the same time or if you are using the
DELAY_KEY_WRITE
table option.
.sp
The fraction of the key buffer in use can be determined using
key_buffer_size
in conjunction with the
Key_blocks_unused
status variable and the buffer block size, which is available from the
key_cache_block_size
system variable:
.sp
.RS 3n
.nf
1 \- ((Key_blocks_unused \(mu key_cache_block_size) / key_buffer_size)
.fi
.RE
This value is an approximation because some space in the key buffer may be allocated internally for administrative structures.
.sp
It is possible to create multiple
MyISAM
key caches. The size limit of 4GB applies to each cache individually, not as a group. See
Section\ 4.6, \(lqThe MyISAM Key Cache\(rq.
.TP 3n
\(bu
key_cache_age_threshold
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l.
T{
\fBName\fR
T}:T{
key_cache_age_threshold
T}
T{
\fBDescription\fR
T}:T{
This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache
T}
T{
\fBOption Sets Variable\fR
T}:T{
Yes, key_cache_age_threshold
T}
T{
\fBVariable Name\fR
T}:T{
key_cache_age_threshold
T}
T{
\fBVariable Scope\fR
T}:T{
Server
T}
T{
\fBDynamic Variable\fR
T}:T{
no
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l
l l
l l.
T{
\fBType\fR
T}:T{
numeric
T}
T{
\fBDefault\fR
T}:T{
300
T}
T{
\fBMin Value\fR
T}:T{
100
T}
.TE
.sp
This value controls the demotion of buffers from the hot sub\-chain of a key cache to the warm sub\-chain. Lower values cause demotion to happen more quickly. The minimum value is 100. The default value is 300. See
Section\ 4.6, \(lqThe MyISAM Key Cache\(rq.
.TP 3n
\(bu
key_cache_block_size
.sp
The size in bytes of blocks in the key cache. The default value is 1024. See
Section\ 4.6, \(lqThe MyISAM Key Cache\(rq.
.TP 3n
\(bu
key_cache_division_limit
.sp
The division point between the hot and warm sub\-chains of the key cache buffer chain. The value is the percentage of the buffer chain to use for the warm sub\-chain. Allowable values range from 1 to 100. The default value is 100. See
Section\ 4.6, \(lqThe MyISAM Key Cache\(rq.
.TP 3n
\(bu
language
.sp
The language used for error messages.
.TP 3n
\(bu
large_file_support
.sp
Whether
\fBmysqld\fR
was compiled with options for large file support.
.TP 3n
\(bu
large_pages
.sp
Whether large page support is enabled.
.TP 3n
\(bu
lc_time_names
.sp
This variable specifies the locale that controls the language used to display day and month names and abbreviations. This variable affects the output from the
DATE_FORMAT(),
DAYNAME()
and
MONTHNAME()
functions. Locale names are POSIX\-style values such as
\'ja_JP'
or
\'pt_BR'. The default value is
\'en_US'
regardless of your system's locale setting. For further information, see
Section\ 8.9, \(lqMySQL Server Locale Support\(rq. This variable was added in MySQL 5.1.12.
.TP 3n
\(bu
license
.sp
The type of license the server has.
.TP 3n
\(bu
local_infile
.sp
Whether
LOCAL
is supported for
LOAD DATA INFILE
statements. See
Section\ 4.4, \(lqSecurity Issues with LOAD DATA LOCAL\(rq.
.TP 3n
\(bu
locked_in_memory
.sp
Whether
\fBmysqld\fR
was locked in memory with
\fB\-\-memlock\fR.
.TP 3n
\(bu
log
.sp
Whether logging of all statements to the general query log is enabled. See
Section\ 9.3, \(lqThe General Query Log\(rq.
.TP 3n
\(bu
log_bin
.sp
Whether the binary log is enabled. See
Section\ 9.4, \(lqThe Binary Log\(rq.
.TP 3n
\(bu
log_bin_trust_function_creators
.sp
This variable applies when binary logging is enabled. It controls whether stored function creators can be trusted not to create stored functions that will cause unsafe events to be written to the binary log. If set to 0 (the default), users are not allowed to create or alter stored routines unless they have the
SUPER
privilege in addition to the
CREATE ROUTINE
or
ALTER ROUTINE
privilege. A setting of 0 also enforces the restriction that a function must be declared with the
DETERMINISTIC
characteristic, or with the
READS SQL DATA
or
NO SQL
characteristic. If the variable is set to 1, MySQL does not enforce these restrictions on stored function creation. See
Section\ 4, \(lqBinary Logging of Stored Routines and Triggers\(rq.
.TP 3n
\(bu
log_error
.sp
The location of the error log.
.TP 3n
\(bu
log_output
.sp
The destination for general query log and slow query log output. The value can be a comma\-separated list of one or more of the words
TABLE
(log to tables),
FILE
(log to files), or
NONE
(do not log to tables or files). The default value is
TABLE.
NONE, if present, takes precedence over any other specifiers. If the value is
NONE
log entries are not written even if the logs are enabled. If the logs are not enabled, no logging occurs even if the value of
log_output
is not
NONE. For more information, see
Section\ 9.1, \(lqSelecting General Query and Slow Query Log Output Destinations\(rq. This variable was added in MySQL 5.1.6.
.TP 3n
\(bu
log_queries_not_using_indexes
.sp
Whether queries that do not use indexes are logged to the slow query log. See
Section\ 9.5, \(lqThe Slow Query Log\(rq. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
log_slave_updates
.sp
Whether updates received by a slave server from a master server should be logged to the slave's own binary log. Binary logging must be enabled on the slave for this variable to have any effect. See
Section\ 1.3, \(lqReplication Options and Variables\(rq.
.TP 3n
\(bu
log_slow_queries
.sp
Whether slow queries should be logged.
\(lqSlow\(rq
is determined by the value of the
long_query_time
variable. See
Section\ 9.5, \(lqThe Slow Query Log\(rq.
.TP 3n
\(bu
log_warnings
.sp
Whether to produce additional warning messages. It is enabled (1) by default and can be disabled by setting it to 0. Aborted connections are not logged to the error log unless the value is greater than 1.
.TP 3n
\(bu
long_query_time
.sp
If a query takes longer than this many seconds, the server increments the
Slow_queries
status variable. If you are using the
\fB\-\-log\-slow\-queries\fR
option, the query is logged to the slow query log file. This value is measured in real time, not CPU time, so a query that is under the threshold on a lightly loaded system might be above the threshold on a heavily loaded one. The minimum value is 1. The default is 10. See
Section\ 9.5, \(lqThe Slow Query Log\(rq.
.TP 3n
\(bu
low_priority_updates
.sp
If set to
1, all
INSERT,
UPDATE,
DELETE, and
LOCK TABLE WRITE
statements wait until there is no pending
SELECT
or
LOCK TABLE READ
on the affected table. This affects only storage engines that use only table\-level locking (MyISAM,
MEMORY,
MERGE). This variable previously was named
sql_low_priority_updates.
.TP 3n
\(bu
lower_case_file_system
.sp
This variable describes the case sensitivity of filenames on the filesystem where the data directory is located.
OFF
means filenames are case sensitive,
ON
means they are not case sensitive.
.TP 3n
\(bu
lower_case_table_names
.sp
If set to 1, table names are stored in lowercase on disk and table name comparisons are not case sensitive. If set to 2 table names are stored as given but compared in lowercase. This option also applies to database names and table aliases. See
Section\ 2.2, \(lqIdentifier Case Sensitivity\(rq.
.sp
If you are using
InnoDB
tables, you should set this variable to 1 on all platforms to force names to be converted to lowercase.
.sp
You should
\fInot\fR
set this variable to 0 if you are running MySQL on a system that does not have case\-sensitive filenames (such as Windows or Mac OS X). If this variable is not set at startup and the filesystem on which the data directory is located does not have case\-sensitive filenames, MySQL automatically sets
lower_case_table_names
to 2.
.TP 3n
\(bu
max_allowed_packet
.sp
The maximum size of one packet or any generated/intermediate string.
.sp
The packet message buffer is initialized to
net_buffer_length
bytes, but can grow up to
max_allowed_packet
bytes when needed. This value by default is small, to catch large (possibly incorrect) packets.
.sp
You must increase this value if you are using large
BLOB
columns or long strings. It should be as big as the largest
BLOB
you want to use. The protocol limit for
max_allowed_packet
is 1GB.
.TP 3n
\(bu
max_binlog_cache_size
.sp
If a multiple\-statement transaction requires more than this many bytes of memory, the server generates a
Multi\-statement transaction required more than 'max_binlog_cache_size' bytes of storage
error. The minimum value is 4096, the maximum and default values are 4GB.
.TP 3n
\(bu
max_binlog_size
.sp
If a write to the binary log causes the current log file size to exceed the value of this variable, the server rotates the binary logs (closes the current file and opens the next one). You cannot set this variable to more than 1GB or to less than 4096 bytes. The default value is 1GB.
.sp
A transaction is written in one chunk to the binary log, so it is never split between several binary logs. Therefore, if you have big transactions, you might see binary logs larger than
max_binlog_size.
.sp
If
max_relay_log_size
is 0, the value of
max_binlog_size
applies to relay logs as well.
.TP 3n
\(bu
max_connect_errors
.sp
If there are more than this number of interrupted connections from a host, that host is blocked from further connections. You can unblock blocked hosts with the
FLUSH HOSTS
statement.
.TP 3n
\(bu
max_connections
.sp
The number of simultaneous client connections allowed. By default, this is 150, beginning with MySQL 5.1.15. (Previously, the default was 100.) See
Section\ 1.2.6, \(lqToo many connections\(rq, for more information.
.sp
Increasing this value increases the number of file descriptors that
\fBmysqld\fR
requires. See
Section\ 4.8, \(lqHow MySQL Opens and Closes Tables\(rq, for comments on file descriptor limits.
.TP 3n
\(bu
max_delayed_threads
.sp
Do not start more than this number of threads to handle
INSERT DELAYED
statements. If you try to insert data into a new table after all
INSERT DELAYED
threads are in use, the row is inserted as if the
DELAYED
attribute wasn't specified. If you set this to 0, MySQL never creates a thread to handle
DELAYED
rows; in effect, this disables
DELAYED
entirely.
.TP 3n
\(bu
max_error_count
.sp
The maximum number of error, warning, and note messages to be stored for display by the
SHOW ERRORS
and
SHOW WARNINGS
statements.
.TP 3n
\(bu
max_heap_table_size
.sp
This variable sets the maximum size to which
MEMORY
tables are allowed to grow. The value of the variable is used to calculate
MEMORY
table
MAX_ROWS
values. Setting this variable has no effect on any existing
MEMORY
table, unless the table is re\-created with a statement such as
CREATE TABLE
or altered with
ALTER TABLE
or
TRUNCATE TABLE.
.TP 3n
\(bu
max_insert_delayed_threads
.sp
This variable is a synonym for
max_delayed_threads.
.TP 3n
\(bu
max_join_size
.sp
Do not allow
SELECT
statements that probably need to examine more than
max_join_size
rows (for single\-table statements) or row combinations (for multiple\-table statements) or that are likely to do more than
max_join_size
disk seeks. By setting this value, you can catch
SELECT
statements where keys are not used properly and that would probably take a long time. Set it if your users tend to perform joins that lack a
WHERE
clause, that take a long time, or that return millions of rows.
.sp
Setting this variable to a value other than
DEFAULT
resets the value of
SQL_BIG_SELECTS
to
0. If you set the
SQL_BIG_SELECTS
value again, the
max_join_size
variable is ignored.
.sp
If a query result is in the query cache, no result size check is performed, because the result has previously been computed and it does not burden the server to send it to the client.
.sp
This variable previously was named
sql_max_join_size.
.TP 3n
\(bu
max_length_for_sort_data
.sp
The cutoff on the size of index values that determines which
filesort
algorithm to use. See
Section\ 2.11, \(lqORDER BY Optimization\(rq.
.TP 3n
\(bu
max_prepared_STATEMENT_count
.sp
This variable limits the total number of prepared statements in the server. It can be used in environments where there is the potential for denial\-of\-service attacks based on running the server out of memory by preparing huge numbers of statements. The default value is 16382. The allowable range of values is from 0 to 1 million. If the value is set lower than the current number of prepared statements, existing statements are not affected and can be used, but no new statements can be prepared until the current number drops below the limit. This variable was added in MySQL 5.1.10.
.TP 3n
\(bu
max_relay_log_size
.sp
If a write by a replication slave to its relay log causes the current log file size to exceed the value of this variable, the slave rotates the relay logs (closes the current file and opens the next one). If
max_relay_log_size
is 0, the server uses
max_binlog_size
for both the binary log and the relay log. If
max_relay_log_size
is greater than 0, it constrains the size of the relay log, which enables you to have different sizes for the two logs. You must set
max_relay_log_size
to between 4096 bytes and 1GB (inclusive), or to 0. The default value is 0. See
Section\ 4.1, \(lqReplication Implementation Details\(rq.
.TP 3n
\(bu
max_seeks_for_key
.sp
Limit the assumed maximum number of seeks when looking up rows based on a key. The MySQL optimizer assumes that no more than this number of key seeks are required when searching for matching rows in a table by scanning an index, regardless of the actual cardinality of the index (see
Section\ 5.4.18, \(lqSHOW INDEX Syntax\(rq). By setting this to a low value (say, 100), you can force MySQL to prefer indexes instead of table scans.
.TP 3n
\(bu
max_sort_length
.sp
The number of bytes to use when sorting
BLOB
or
TEXT
values. Only the first
max_sort_length
bytes of each value are used; the rest are ignored.
.TP 3n
\(bu
max_sp_recursion_depth
.sp
The number of times that a stored procedure may call itself. The default value for this option is 0, which completely disallows recursion in stored procedures. The maximum value is 255.
.sp
This variable can be set globally and per session.
.TP 3n
\(bu
max_tmp_tables
.sp
The maximum number of temporary tables a client can keep open at the same time. (This option does not yet do anything.)
.TP 3n
\(bu
max_user_connections
.sp
The maximum number of simultaneous connections allowed to any given MySQL account. A value of 0 means
\(lqno limit.\(rq
.sp
This variable has both a global scope and a (read\-only) session scope. The session variable has the same value as the global variable unless the current account has a non\-zero
MAX_USER_CONNECTIONS
resource limit. In that case, the session value reflects the account limit.
.TP 3n
\(bu
max_write_lock_count
.sp
After this many write locks, allow some pending read lock requests to be processed in between.
.TP 3n
\(bu
multi_range_count
.sp
The maximum number of ranges to send to a table handler at once during range selects. The default value is 256. Sending multiple ranges to a handler at once can improve the performance of certain selects dramatically. This especially true for the NDB Cluster table handler, which needs to send the range requests to all nodes. Sending a batch of those requests at once reduces the communication costs significantly.
.TP 3n
\(bu
myisam_block_size
.sp
The block size to be used for
MyISAM
index pages.
.TP 3n
\(bu
myisam_data_pointer_size
.sp
The default pointer size in bytes, to be used by
CREATE TABLE
for
MyISAM
tables when no
MAX_ROWS
option is specified. This variable cannot be less than 2 or larger than 7. The default value is 6. See
Section\ 1.2.11, \(lqThe table is full\(rq.
.TP 3n
\(bu
myisam_max_extra_sort_file_size
(\fIDEPRECATED\fR)
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
This variable is not supported in MySQL 5.1. See
MySQL 5.0 Reference Manual
for more information.
.TP 3n
\(bu
myisam_max_sort_file_size
.sp
The maximum size of the temporary file that MySQL is allowed to use while re\-creating a
MyISAM
index (during
REPAIR TABLE,
ALTER TABLE, or
LOAD DATA INFILE). If the file size would be larger than this value, the index is created using the key cache instead, which is slower. The value is given in bytes.
.sp
The default value is 2GB. If
MyISAM
index files exceed this size and disk space is available, increasing the value may help performance.
.TP 3n
\(bu
myisam_recover_options
.sp
The value of the
\fB\-\-myisam\-recover\fR
option. See
the section called \(lqCOMMAND OPTIONS\(rq.
.TP 3n
\(bu
myisam_repair_threads
.sp
If this value is greater than 1,
MyISAM
table indexes are created in parallel (each index in its own thread) during the
Repair by sorting
process. The default value is 1.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
Multi\-threaded repair is still
\fIbeta\-quality\fR
code.
.TP 3n
\(bu
myisam_sort_buffer_size
.sp
The size of the buffer that is allocated when sorting
MyISAM
indexes during a
REPAIR TABLE
or when creating indexes with
CREATE INDEX
or
ALTER TABLE.
.TP 3n
\(bu
myisam_stats_method
.sp
How the server treats
NULL
values when collecting statistics about the distribution of index values for
MyISAM
tables. This variable has two possible values,
nulls_equal
and
nulls_unequal. For
nulls_equal, all
NULL
index values are considered equal and form a single value group that has a size equal to the number of
NULL
values. For
nulls_unequal,
NULL
values are considered unequal, and each
NULL
forms a distinct value group of size 1.
.sp
The method that is used for generating table statistics influences how the optimizer chooses indexes for query execution, as described in
Section\ 4.7, \(lqMyISAM Index Statistics Collection\(rq.
.TP 3n
\(bu
myisam_use_mmap
.sp
Use memory mapping for reading and writing
MyISAM
tables. This variable was added in MySQL 5.1.4.
.TP 3n
\(bu
multi_read_range
.sp
Specifies the maximum number of ranges to send to a storage engine during range selects. The default value is 256. Sending multiple ranges to an engine is a feature that can improve the performance of certain selects dramatically, particularly for
NDBCLUSTER. This engine needs to send the range requests to all nodes, and sending many of those requests at once reduces the communication costs significantly.
.TP 3n
\(bu
named_pipe
.sp
(Windows only.) Indicates whether the server supports connections over named pipes.
.TP 3n
\(bu
ndb_autoincrement_prefetch_sz
.sp
Determines the probability of gaps in an autoincremented column. Set to
1
to minimize this. Set to a high value for optimization \(em makes inserts faster, but decreases the likelihood that consecutive autoincrement numbers will be used in a batch of inserts. Default value:
32. Mimimum value:
1.
.TP 3n
\(bu
ndb_cache_check_time
.sp
The number of milliseconds to wait before checking the
NDB
query cache. Setting this to
0
(the default and minimum value) means that the
NDB
query cache will be checked for validation on every query.
.sp
The recommended maximum value for this variable is
1000, which means that the query cache is checked once per second. A larger value means the
NDB
query cache is less often checked and invalidated due to updates on a different
\fBmysqld\fR. It is generally not desirable to set this to a value greater than
2000.
.TP 3n
\(bu
ndb_extra_logging
.sp
This variable can be set to a non\-zero value to enable extra
NDB
logging for debugging or troubleshooting purposes. The default value is
0.
.sp
This variable was added in MySQL 5.1.6.
.TP 3n
\(bu
ndb_force_send
.sp
Forces sending of buffers to
NDB
immediately, without waiting for other threads. Defaults to
ON.
.TP 3n
\(bu
ndb_index_stat_cache_entries
.sp
Sets the granularity of the statistics by determining the number of starting and ending keys to store in the statistics memory cache. Zero means no caching takes place; in this case, the data nodes are always queried directly. Default value:
32.
.TP 3n
\(bu
ndb_index_stat_enable
.sp
Use
NDB
index statistics in query optimization. Defaults to
ON.
.TP 3n
\(bu
ndb_index_stat_update_freq
.sp
How often to query data nodes instead of the statistics cache. For example, a value of
20
(the default) means to direct every 20th
query to the data nodes.
.TP 3n
\(bu
ndb_optimized_node_selection
.sp
Causes an SQL node to contact the nearest data node in the cluster. Enabled by default. Set to
0
or
OFF
to disable, in which case the SQL node attempts to contact data nodes in succession.
.sp
Added in MySQL 4.1.9.
.TP 3n
\(bu
ndb_report_thresh_binlog_epoch_slip
.sp
This is a threshold on the number of epochs to be behind before reporting binlog status. For example, a value of
3
(the default) means that if the difference between which epoch has been received from the storage nodes and which epoch has been applied to the binlog is 3 or more, a status message will be sent to the cluster log.
.TP 3n
\(bu
ndb_report_thresh_binlog_mem_usage
.sp
This is a threshold on the percentage of free memory remaining before reporting binlog status. For example, a value of
10
(the default) means that if the amount of available memory for receiving binlog data from the data nodes falls below 10%, a status message will be sent to the cluster log.
.TP 3n
\(bu
ndb_use_copying_alter_table
.sp
Forces
NDB
to use copying of tables in the event of problems with online
ALTER TABLE
operations. The default value is
OFF.
.sp
This variable was added in MySQL 5.1.12.
.TP 3n
\(bu
ndb_use_exact_count
.sp
Forces
NDB
to use a count of records during
SELECT COUNT(*)
query planning to speed up this type of query. The default value is
ON. For faster queries overall, disable this feature by setting the value of
ndb_use_exact_count
to
OFF.
.TP 3n
\(bu
ndb_use_transactions
.sp
You can disable
NDB
transaction support by setting this variable's values to
OFF
(not recommended). The default is
ON.
.TP 3n
\(bu
ndb_wait_connected
.PP
\fBMySQL Cluster 5.1 Carrier Grade Edition\fR. This variable is available in MySQL Cluster 5.1 Carrier Grade Edition only. For more information about MySQL Cluster 5.1 Carrier Grade Edition, see
Section\ 2, \(lqMySQL Cluster 5.1 Carrier Grade Edition\(rq.
This variable can be used to cause the MySQL server to wait a given period of time for connections to MySQL Cluster management and data nodes to be established before accepting MySQL client connections. The time is specified in seconds. The default value is
0.
.TP 3n
\(bu
net_buffer_length
.sp
Each client thread is associated with a connection buffer and result buffer. Both begin with a size given by
net_buffer_length
but are dynamically enlarged up to
max_allowed_packet
bytes as needed. The result buffer shrinks to
net_buffer_length
after each SQL statement.
.sp
This variable should not normally be changed, but if you have very little memory, you can set it to the expected length of statements sent by clients. If statements exceed this length, the connection buffer is automatically enlarged. The maximum value to which
net_buffer_length
can be set is 1MB.
.TP 3n
\(bu
net_read_timeout
.sp
The number of seconds to wait for more data from a connection before aborting the read. This timeout applies only to TCP/IP connections, not to connections made via Unix socket files, named pipes, or shared memory. When the server is reading from the client,
net_read_timeout
is the timeout value controlling when to abort. When the server is writing to the client,
net_write_timeout
is the timeout value controlling when to abort. See also
slave_net_timeout.
.TP 3n
\(bu
net_retry_count
.sp
If a read on a communication port is interrupted, retry this many times before giving up. This value should be set quite high on FreeBSD because internal interrupts are sent to all threads.
.TP 3n
\(bu
net_write_timeout
.sp
The number of seconds to wait for a block to be written to a connection before aborting the write. This timeout applies only to TCP/IP connections, not to connections made via Unix socket files, named pipes, or shared memory. See also
net_read_timeout.
.TP 3n
\(bu
new
.sp
This variable was used in MySQL 4.0 to turn on some 4.1 behaviors, and is retained for backward compatibility. In MySQL 5.1, its value is always
OFF.
.TP 3n
\(bu
old
.sp
old
is a compatibility variable. It is disabled by default, but can be enabled at startup to revert the server to behaviors present in older versions.
.sp
Currently, when
old
is enabled, it changes the default scope of index hints to that used prior to MySQL 5.1.17. That is, index hints with no
FOR
clause apply only to how indexes are used for row retrieval and not to resolution of
ORDER BY
or
GROUP BY
clauses. (See
Section\ 2.7.2, \(lqIndex Hint Syntax\(rq.) Take care about enabling this in a replication setup. With statement\-based binary logging, having different modes for the master and slaves might lead to replication errors.
.sp
This variable was added as
old_mode
in MySQL 5.1.17 and renamed to
old
in MySQL 5.1.18.
.TP 3n
\(bu
old_passwords
.sp
Whether the server should use pre\-4.1\-style passwords for MySQL user accounts. See
Section\ 1.2.3, \(lqClient does not support authentication protocol\(rq.
.TP 3n
\(bu
one_shot
.sp
This is not a variable, but it can be used when setting some variables. It is described in
Section\ 5.3, \(lqSET Syntax\(rq.
.TP 3n
\(bu
open_files_limit
.sp
The number of files that the operating system allows
\fBmysqld\fR
to open. This is the real value allowed by the system and might be different from the value you gave using the
\fB\-\-open\-files\-limit\fR
option to
\fBmysqld\fR
or
\fBmysqld_safe\fR. The value is 0 on systems where MySQL can't change the number of open files.
.TP 3n
\(bu
optimizer_prune_level
.sp
Controls the heuristics applied during query optimization to prune less\-promising partial plans from the optimizer search space. A value of 0 disables heuristics so that the optimizer performs an exhaustive search. A value of 1 causes the optimizer to prune plans based on the number of rows retrieved by intermediate plans.
.TP 3n
\(bu
optimizer_search_depth
.sp
The maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to generate an execution plan for a query. Values smaller than the number of relations in a query return an execution plan quicker, but the resulting plan may be far from being optimal. If set to 0, the system automatically picks a reasonable value. If set to the maximum number of tables used in a query plus 2, the optimizer switches to the algorithm used in MySQL 5.0.0 (and previous versions) for performing searches.
.TP 3n
\(bu
pid_file
.sp
The pathname of the process ID (PID) file. This variable can be set with the
\fB\-\-pid\-file\fR
option.
.TP 3n
\(bu
plugin_dir
.sp
The pathname of the plugins directory. This variable was added in MySQL 5.1.2.
.TP 3n
\(bu
port
.sp
The number of the port on which the server listens for TCP/IP connections. This variable can be set with the
\fB\-\-port\fR
option.
.TP 3n
\(bu
preload_buffer_size
.sp
The size of the buffer that is allocated when preloading indexes.
.TP 3n
\(bu
prepared_STATEMENT_count
.sp
The current number of prepared statements. (The maximum number of statements is given by the
max_prepared_STATEMENT_count
system variable.) This variable was added in MySQL 5.1.10. In MySQL 5.1.14, it was converted to the global
Prepared_STATEMENT_count
status variable.
.TP 3n
\(bu
protocol_version
.sp
The version of the client/server protocol used by the MySQL server.
.TP 3n
\(bu
query_alloc_block_size
.sp
The allocation size of memory blocks that are allocated for objects created during statement parsing and execution. If you have problems with memory fragmentation, it might help to increase this a bit.
.TP 3n
\(bu
query_cache_limit
.sp
Don't cache results that are larger than this number of bytes. The default value is 1MB.
.TP 3n
\(bu
query_cache_min_res_unit
.sp
The minimum size (in bytes) for blocks allocated by the query cache. The default value is 4096 (4KB). Tuning information for this variable is given in
Section\ 5.4.3, \(lqQuery Cache Configuration\(rq.
.TP 3n
\(bu
query_cache_size
.sp
The amount of memory allocated for caching query results. The default value is 0, which disables the query cache. The allowable values are multiples of 1024; other values are rounded down to the nearest multiple. Note that
query_cache_size
bytes of memory are allocated even if
query_cache_type
is set to 0. See
Section\ 5.4.3, \(lqQuery Cache Configuration\(rq, for more information.
.TP 3n
\(bu
query_cache_type
.sp
Set the query cache type. Setting the
GLOBAL
value sets the type for all clients that connect thereafter. Individual clients can set the
SESSION
value to affect their own use of the query cache. Possible values are shown in the following table:
.TS
allbox tab(:);
l l
l l
l l
l l.
T{
\fBOption\fR
T}:T{
\fBDescription\fR
T}
T{
0 or OFF
T}:T{
Don't cache results in or retrieve results from the query cache. Note
that this does not deallocate the query cache
buffer. To do that, you should set
query_cache_size to 0.
T}
T{
1 or ON
T}:T{
Cache all query results except for those that begin with SELECT
SQL_NO_CACHE.
T}
T{
2 or DEMAND
T}:T{
Cache results only for queries that begin with SELECT
SQL_CACHE.
T}
.TE
.sp
This variable defaults to
ON.
.TP 3n
\(bu
query_cache_wlock_invalidate
.sp
Normally, when one client acquires a
WRITE
lock on a
MyISAM
table, other clients are not blocked from issuing statements that read from the table if the query results are present in the query cache. Setting this variable to 1 causes acquisition of a
WRITE
lock for a table to invalidate any queries in the query cache that refer to the table. This forces other clients that attempt to access the table to wait while the lock is in effect.
.TP 3n
\(bu
query_prealloc_size
.sp
The size of the persistent buffer used for statement parsing and execution. This buffer is not freed between statements. If you are running complex queries, a larger
query_prealloc_size
value might be helpful in improving performance, because it can reduce the need for the server to perform memory allocation during query execution operations.
.sp
.TP 3n
\(bu
range_alloc_block_size
.sp
The size of blocks that are allocated when doing range optimization.
.TP 3n
\(bu
read_buffer_size
.sp
Each thread that does a sequential scan allocates a buffer of this size (in bytes) for each table it scans. If you do many sequential scans, you might want to increase this value, which defaults to 131072.
.sp
read_buffer_size
and
read_rnd_buffer_size
are not specific to any storage engine and apply in a general manner for optimization. See
Section\ 5.7, \(lqHow MySQL Uses Memory\(rq, for example.
.TP 3n
\(bu
read_only
.sp
When this variable is set to
ON, the server allows no updates except from users that have the
SUPER
privilege or (on a slave server) from updates performed by slave threads. On a slave server, this can be useful to ensure that the slave accepts updates only from its master server and not from clients. This variable does not apply to
TEMPORARY
tables.
.sp
read_only
exists only as a
GLOBAL
variable, so changes to its value require the
SUPER
privilege. Changes to
read_only
on a master server are not replicated to slave servers. The value can be set on a slave server independent of the setting on the master.
.sp
As of MySQL 5.1.15, the following conditions apply:
.RS 3n
.TP 3n
\(bu
If you attempt to enable
read_only
while you have any explicit locks (acquired with
LOCK TABLES
or have a pending transaction, an error will occur.
.TP 3n
\(bu
If other clients hold explicit table locks or have pending transactions, the attempt to enable
read_only
blocks until the locks are released and the transactions end. While the attempt to enable
read_only
is pending, requests by other clients for table locks or to begin transactions also block until
read_only
has been set.
.TP 3n
\(bu
read_only
can be enabled while you hold a global read lock (acquired with
FLUSH TABLES WITH READ LOCK) because that does not involve table locks.
.RE
.TP 3n
\(bu
read_rnd_buffer_size
.sp
When reading rows in sorted order following a key\-sorting operation, the rows are read through this buffer to avoid disk seeks. See
Section\ 2.11, \(lqORDER BY Optimization\(rq. Setting the variable to a large value can improve
ORDER BY
performance by a lot. However, this is a buffer allocated for each client, so you should not set the global variable to a large value. Instead, change the session variable only from within those clients that need to run large queries.
.sp
read_buffer_size
and
read_rnd_buffer_size
are not specific to any storage engine and apply in a general manner for optimization. See
Section\ 5.7, \(lqHow MySQL Uses Memory\(rq, for example.
.TP 3n
\(bu
relay_log_purge
.sp
Disables or enables automatic purging of relay log files as soon as they are not needed any more. The default value is 1 (ON).
.TP 3n
\(bu
rpl_recovery_rank
.sp
This variable is unused.
.TP 3n
\(bu
secure_auth
.sp
If the MySQL server has been started with the
\fB\-\-secure\-auth\fR
option, it blocks connections from all accounts that have passwords stored in the old (pre\-4.1) format. In that case, the value of this variable is
ON, otherwise it is
OFF.
.sp
You should enable this option if you want to prevent all use of passwords employing the old format (and hence insecure communication over the network).
.sp
Server startup fails with an error if this option is enabled and the privilege tables are in pre\-4.1 format. See
Section\ 1.2.3, \(lqClient does not support authentication protocol\(rq.
.TP 3n
\(bu
secure_file_priv
.sp
By default, this variable is empty. If set to the name of a directory, it limits the effect of the
LOAD_FILE()
function and the
LOAD DATA
and
SELECT ... INTO OUTFILE
statements to work only with files in that directory.
.sp
This variable was added in MySQL 5.1.17.
.TP 3n
\(bu
server_id
.sp
The server ID. This value is set by the
\fB\-\-server\-id\fR
option. It is used for replication to enable master and slave servers to identify themselves uniquely.
.TP 3n
\(bu
shared_memory
.sp
(Windows only.) Whether the server allows shared\-memory connections.
.TP 3n
\(bu
shared_memory_base_name
.sp
(Windows only.) The name of shared memory to use for shared\-memory connections. This is useful when running multiple MySQL instances on a single physical machine. The default name is
MYSQL. The name is case sensitive.
.TP 3n
\(bu
skip_external_locking
.sp
This is
OFF
if
\fBmysqld\fR
uses external locking,
ON
if external locking is disabled.
.TP 3n
\(bu
skip_networking
.sp
This is
ON
if the server allows only local (non\-TCP/IP) connections. On Unix, local connections use a Unix socket file. On Windows, local connections use a named pipe or shared memory. On NetWare, only TCP/IP connections are supported, so do not set this variable to
ON. This variable can be set to
ON
with the
\fB\-\-skip\-networking\fR
option.
.TP 3n
\(bu
skip_show_database
.sp
This prevents people from using the
SHOW DATABASES
statement if they do not have the
SHOW DATABASES
privilege. This can improve security if you have concerns about users being able to see databases belonging to other users. Its effect depends on the
SHOW DATABASES
privilege: If the variable value is
ON, the
SHOW DATABASES
statement is allowed only to users who have the
SHOW DATABASES
privilege, and the statement displays all database names. If the value is
OFF,
SHOW DATABASES
is allowed to all users, but displays the names of only those databases for which the user has the
SHOW DATABASES
or other privilege.
.TP 3n
\(bu
slave_compressed_protocol
.sp
Whether to use compression of the slave/master protocol if both the slave and the master support it.
.TP 3n
\(bu
slave_load_tmpdir
.sp
The name of the directory where the slave creates temporary files for replicating
LOAD DATA INFILE
statements.
.TP 3n
\(bu
slave_net_timeout
.sp
The number of seconds to wait for more data from a master/slave connection before aborting the read. This timeout applies only to TCP/IP connections, not to connections made via Unix socket files, named pipes, or shared memory.
.TP 3n
\(bu
slave_skip_errors
.sp
Normally, replication stops when an error occurs on the slave. This gives you the opportunity to resolve the inconsistency in the data manually. This variable tells the slave SQL thread to continue replication when a statement returns any of the errors listed in the variable value.
.TP 3n
\(bu
slave_transaction_retries
.sp
If a replication slave SQL thread fails to execute a transaction because of an
InnoDB
deadlock or exceeded
InnoDB's
innodb_lock_wait_timeout
or NDBCluster's
TransactionDeadlockDetectionTimeout
or
TransactionInactiveTimeout, it automatically retries
slave_transaction_retries
times before stopping with an error. The default value is 10.
.TP 3n
\(bu
slow_launch_time
.sp
If creating a thread takes longer than this many seconds, the server increments the
Slow_launch_threads
status variable.
.TP 3n
\(bu
slow_query_log
.sp
Whether the slow query log is enabled. The value can be 0 (or
OFF) to disable the log or 1 (or
ON) to enable the log. The default value depends on whether the
\fB\-\-log\-slow\-queries\fR
option is given. The destination for log output is controlled by the
log_output
system variable; if that value is
NONE, no log entries are written even if the log is enabled. The
slow_query_log
variable was added in MySQL 5.1.12.
.TP 3n
\(bu
slow_query_log_file
.sp
The name of the slow query log file. The default value is
\fI\fIhost_name\fR\fR\fI\-slow.log\fR, but the initial value can be changed with the
\fB\-\-log\-slow\-queries\fR
option. This variable was added in MySQL 5.1.12.
.TP 3n
\(bu
socket
.sp
On Unix platforms, this variable is the name of the socket file that is used for local client connections. The default is
\fI/tmp/mysql.sock\fR. (For some distribution formats, the directory might be different, such as
\fI/var/lib/mysql\fR
for RPMs.)
.sp
On Windows, this variable is the name of the named pipe that is used for local client connections. The default value is
MySQL
(not case sensitive).
.TP 3n
\(bu
sort_buffer_size
.sp
Each thread that needs to do a sort allocates a buffer of this size. Increase this value for faster
ORDER BY
or
GROUP BY
operations. See
Section\ 1.4.4, \(lqWhere MySQL Stores Temporary Files\(rq.
.TP 3n
\(bu
sql_mode
.sp
The current server SQL mode, which can be set dynamically. See
the section called \(lqSQL MODES\(rq.
.TP 3n
\(bu
sql_slave_skip_counter
.sp
The number of events from the master that a slave server should skip. See
Section\ 6.2.6, \(lqSET GLOBAL SQL_SLAVE_SKIP_COUNTER Syntax\(rq.
.TP 3n
\(bu
ssl_ca
.sp
The path to a file with a list of trusted SSL CAs. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
ssl_capath
.sp
The path to a directory that contains trusted SSL CA certificates in PEM format. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
ssl_cert
.sp
The name of the SSL certificate file to use for establishing a secure connection. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
ssl_cipher
.sp
A list of allowable ciphers to use for SSL encryption. The cipher list has the same format as the
openssl ciphers
command. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
ssl_key
.sp
The name of the SSL key file to use for establishing a secure connection. This variable was added in MySQL 5.1.11.
.TP 3n
\(bu
storage_engine
.sp
The default storage engine (table type). To set the storage engine at server startup, use the
\fB\-\-default\-storage\-engine\fR
option. See
the section called \(lqCOMMAND OPTIONS\(rq.
.TP 3n
\(bu
sync_binlog
.sp
If the value of this variable is positive, the MySQL server synchronizes its binary log to disk (using
fdatasync()) after every
sync_binlog
writes to the binary log. Note that there is one write to the binary log per statement if autocommit is enabled, and one write per transaction otherwise. The default value is 0, which does no synchronizing to disk. A value of 1 is the safest choice, because in the event of a crash you lose at most one statement or transaction from the binary log. However, it is also the slowest choice (unless the disk has a battery\-backed cache, which makes synchronization very fast).
.sp
If the value of
sync_binlog
is 0 (the default), no extra flushing is done. The server relies on the operating system to flush the file contents occasionaly as for any other file.
.TP 3n
\(bu
sync_frm
.sp
If this variable is set to 1, when any non\-temporary table is created its
\fI.frm\fR
file is synchronized to disk (using
fdatasync()). This is slower but safer in case of a crash. The default is 1.
.TP 3n
\(bu
system_time_zone
.sp
The server system time zone. When the server begins executing, it inherits a time zone setting from the machine defaults, possibly modified by the environment of the account used for running the server or the startup script. The value is used to set
system_time_zone. Typically the time zone is specified by the
TZ
environment variable. It also can be specified using the
\fB\-\-timezone\fR
option of the
\fBmysqld_safe\fR
script.
.sp
The
system_time_zone
variable differs from
time_zone. Although they might have the same value, the latter variable is used to initialize the time zone for each client that connects. See
Section\ 8.8, \(lqMySQL Server Time Zone Support\(rq.
.TP 3n
\(bu
table_cache
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l
l l.
T{
\fBName\fR
T}:T{
table_cache
T}
T{
\fBDescription\fR
T}:T{
Deprecated; use \-\-table_open_cache instead
T}
T{
\fBOption Sets Variable\fR
T}:T{
Yes, table_cache
T}
T{
\fBVariable Name\fR
T}:T{
table_cache
T}
T{
\fBVariable Scope\fR
T}:T{
Server
T}
T{
\fBDynamic Variable\fR
T}:T{
yes
T}
T{
\fBDeprecated\fR
T}:T{
5.1.3, by table_open_cache
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l
l l.
T{
\fBType\fR
T}:T{
numeric
T}
T{
\fBDefault\fR
T}:T{
64
T}
.TE
.sp
This is the old name of
table_open_cache
before MySQL 5.1.3. From 5.1.3 on, use
table_open_cache
instead.
.TP 3n
\(bu
table_definition_cache
.sp
The number of table definitions that can be stored in the definition cache. If you use a large number of tables, you can create a large table definition cache to speed up opening of tables. The table definition cache takes less space and does not use file descriptors, unlike the normal table cache. This variable was added in MySQL 5.1.3.
.TP 3n
\(bu
table_lock_wait_timeout
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l.
T{
\fBName\fR
T}:T{
table_lock_wait_timeout
T}
T{
\fBDescription\fR
T}:T{
Timeout in seconds to wait for a table level lock before returning an error. Used only if the connection has active cursors
T}
T{
\fBOption Sets Variable\fR
T}:T{
Yes, table_lock_wait_timeout
T}
T{
\fBVariable Name\fR
T}:T{
table_lock_wait_timeout
T}
T{
\fBVariable Scope\fR
T}:T{
Server
T}
T{
\fBDynamic Variable\fR
T}:T{
yes
T}
T{
\fBValue Set\fR
T}:T{
[\fInested\ table\fR]*
T}
.TE
.sp
.PP
.B *[nested\ table]
.sp -1n
.TS
allbox tab(:);
l l
l l.
T{
\fBType\fR
T}:T{
numeric
T}
T{
\fBDefault\fR
T}:T{
50
T}
.TE
.sp
Specifies a wait timeout for table\-level locks, in seconds. The default timeout is 50 seconds. The timeout is active only if the connection has open cursors. This variable can also be set globally at runtime (you need the
SUPER
privilege to do this).
.TP 3n
\(bu
table_open_cache
.sp
The number of open tables for all threads. Increasing this value increases the number of file descriptors that
\fBmysqld\fR
requires. You can check whether you need to increase the table cache by checking the
Opened_tables
status variable. See
the section called \(lqSTATUS VARIABLES\(rq. If the value of
Opened_tables
is large and you don't do
FLUSH TABLES
often (which just forces all tables to be closed and reopened), then you should increase the value of the
table_open_cache
variable. For more information about the table cache, see
Section\ 4.8, \(lqHow MySQL Opens and Closes Tables\(rq. Before MySQL 5.1.3, this variable is called
table_cache.
.TP 3n
\(bu
table_type
.sp
This variable is a synonym for
storage_engine. In MySQL 5.1,
storage_engine
is the preferred name. In MySQL 5.2,
table_type
will be removed.
.TP 3n
\(bu
thread_cache_size
.sp
How many threads the server should cache for reuse. When a client disconnects, the client's threads are put in the cache if there are fewer than
thread_cache_size
threads there. Requests for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache is empty is a new thread created. This variable can be increased to improve performance if you have a lot of new connections. (Normally, this doesn't provide a notable performance improvement if you have a good thread implementation.) By examining the difference between the
Connections
and
Threads_created
status variables, you can see how efficient the thread cache is. For details, see
the section called \(lqSTATUS VARIABLES\(rq.
.TP 3n
\(bu
thread_concurrency
.sp
On Solaris,
\fBmysqld\fR
calls
thr_setconcurrency()
with this value. This function enables applications to give the threads system a hint about the desired number of threads that should be run at the same time.
.TP 3n
\(bu
thread_handling
.sp
The thread\-handling model. The allowable values are
one\-thread
(the server uses one thread) and
one\-thread\-per\-connection
(the server uses multiple threads).
one\-thread
is useful for debugging under Linux; see see
[1]\&\fIMySQL Internals: Porting\fR. This variable was added in MySQL 5.1.17
.TP 3n
\(bu
thread_stack
.sp
The stack size for each thread. Many of the limits detected by the
crash\-me
test are dependent on this value. The default is large enough for normal operation. See
Section\ 1.4, \(lqThe MySQL Benchmark Suite\(rq. The default is 192KB.
.TP 3n
\(bu
time_format
.sp
This variable is not implemented.
.TP 3n
\(bu
time_zone
.sp
The current time zone. This variable is used to initialize the time zone for each client that connects. By default, the initial value of this is
\'SYSTEM'
(which means,
\(lquse the value of system_time_zone\(rq). The value can be specified explicitly at server startup with the
\fB\-\-default\-time\-zone\fR
option. See
Section\ 8.8, \(lqMySQL Server Time Zone Support\(rq.
.TP 3n
\(bu
timed_mutexes
.sp
This variable controls whether
InnoDB
mutexes are timed. If this variable is set to 0 or
OFF
(the default), mutex timing is disabled. If the variable is set to 1 or
ON, mutex timing is enabled. With timing enabled, the
os_wait_times
value in the output from
SHOW ENGINE INNODB MUTEX
indicates the amount of time (in ms) spent in operating system waits. Otherwise, the value is 0.
.TP 3n
\(bu
tmp_table_size
.sp
The maximum size of internal in\-memory temporary tables. (The actual limit is determined as the smaller of
max_heap_table_size
and
tmp_table_size.) If an in\-memory temporary table exceeds the limit, MySQL automatically converts it to an on\-disk
MyISAM
table. Increase the value of
tmp_table_size
(and
max_heap_table_size
if necessary) if you do many advanced
GROUP BY
queries and you have lots of memory. This variable does not apply to user\-created
MEMORY
tables.
.TP 3n
\(bu
tmpdir
.sp
The directory used for temporary files and temporary tables. This variable can be set to a list of several paths that are used in round\-robin fashion. Paths should be separated by colon characters (\(oq:\(cq) on Unix and semicolon characters (\(oq;\(cq) on Windows, NetWare, and OS/2.
.sp
The multiple\-directory feature can be used to spread the load between several physical disks. If the MySQL server is acting as a replication slave, you should not set
tmpdir
to point to a directory on a memory\-based filesystem or to a directory that is cleared when the server host restarts. A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables or
LOAD DATA INFILE
operations. If files in the temporary file directory are lost when the server restarts, replication fails. However, if you are using MySQL 4.0.0 or later, you can set the slave's temporary directory using the
slave_load_tmpdir
variable. In that case, the slave won't use the general
tmpdir
value and you can set
tmpdir
to a non\-permanent location.
.TP 3n
\(bu
transaction_alloc_block_size
.sp
The amount in bytes by which to increase a per\-transaction memory pool which needs memory. See the description of
transaction_prealloc_size.
.TP 3n
\(bu
transaction_prealloc_size
.sp
There is a per\-transaction memory pool from which various transaction\-related allocations take memory. The initial size of the pool in bytes is
transaction_prealloc_size. For every allocation that cannot be satisfied from the pool because it has insufficient memory available, the pool is increased by
transaction_alloc_block_size
bytes. When the transaction ends, the pool is truncated to
transaction_prealloc_size
bytes.
.sp
By making
transaction_prealloc_size
sufficiently large to contain all statements within a single transaction, you can avoid many
malloc()
calls.
.TP 3n
\(bu
tx_isolation
.sp
The default transaction isolation level. Defaults to
REPEATABLE\-READ.
.sp
This variable is set by the
SET TRANSACTION ISOLATION LEVEL
statement. See
Section\ 4.6, \(lqSET TRANSACTION Syntax\(rq. If you set
tx_isolation
directly to an isolation level name that contains a space, the name should be enclosed within quotes, with the space replaced by a dash. For example:
.sp
.RS 3n
.nf
SET tx_isolation = 'READ\-COMMITTED';
.fi
.RE
.TP 3n
\(bu
updatable_views_with_limit
.sp
This variable controls whether updates to a view can be made when the view does not contain all columns of the primary key defined in the underlying table, if the update statement contains a
LIMIT
clause. (Such updates often are generated by GUI tools.) An update is an
UPDATE
or
DELETE
statement. Primary key here means a
PRIMARY KEY, or a
UNIQUE
index in which no column can contain
NULL.
.sp
The variable can have two values:
.RS 3n
.TP 3n
\(bu
1
or
YES: Issue a warning only (not an error message). This is the default value.
.TP 3n
\(bu
0
or
NO: Prohibit the update.
.RE
.TP 3n
\(bu
version
.sp
The version number for the server.
.TP 3n
\(bu
version_comment
.sp
The
\fBconfigure\fR
script has a
\fB\-\-with\-comment\fR
option that allows a comment to be specified when building MySQL. This variable contains the value of that comment.
.TP 3n
\(bu
version_compile_machine
.sp
The type of machine or architecture on which MySQL was built.
.TP 3n
\(bu
version_compile_os
.sp
The type of operating system on which MySQL was built.
.TP 3n
\(bu
wait_timeout
.sp
The number of seconds the server waits for activity on a non\-interactive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made via named pipes, or shared memory.
.sp
On thread startup, the session
wait_timeout
value is initialized from the global
wait_timeout
value or from the global
interactive_timeout
value, depending on the type of client (as defined by the
CLIENT_INTERACTIVE
connect option to
mysql_real_connect()). See also
interactive_timeout.
.SH "USING SYSTEM VARIABLES"
.PP
The MySQL server maintains many system variables that indicate how it is configured.
the section called \(lqSYSTEM VARIABLES\(rq, describes the meaning of these variables. 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.
.PP
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:
.TP 3n
\(bu
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. (See
Section\ 3, \(lqSpecifying Program Options\(rq.)
.TP 3n
\(bu
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. For example, the client's SQL mode is controlled by the session
sql_mode
value, which is initialized when the client connects to the value of the global
sql_mode
value.
.sp
.RE
.PP
System variable values can be set globally at server startup by using options on the command line or in an option file. When you use a startup option to set a variable that takes a numeric value, the value can be given with a suffix of
K,
M, or
G
(either uppercase or lowercase) to indicate a multiplier of 1024, 10242
or 10243; that is, units of kilobytes, megabytes, or gigabytes, respectively. Thus, the following command starts the server with a query cache size of 16 megabytes and a maximum packet size of one gigabyte:
.sp
.RS 3n
.nf
mysqld \-\-query_cache_size=16M \-\-max_allowed_packet=1G
.fi
.RE
.PP
Within an option file, those variables are set like this:
.sp
.RS 3n
.nf
[mysqld]
query_cache_size=16M
max_allowed_packet=1G
.fi
.RE
.PP
The lettercase of suffix letters does not matter;
16M
and
16m
are equivalent, as are
1G
and
1g.
.PP
If you want to restrict the maximum value to which a system variable can be set at runtime with the
SET
statement, you can specify this maximum by using an option of the form
\fB\-\-maximum\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
at server startup. For example, to prevent the value of
query_cache_size
from being increased to more than 32MB at runtime, use the option
\fB\-\-maximum\-query_cache_size=32M\fR.
.PP
Many system variables are dynamic and can be changed while the server runs by using the
SET
statement. For a list, see
the section called \(lqDynamic System Variables\(rq. To change a system variable with
SET, refer to it as
\fIvar_name\fR, optionally preceded by a modifier:
.TP 3n
\(bu
To indicate explicitly that a variable is a global variable, precede its name by
GLOBAL
or
@@global.. The
SUPER
privilege is required to set global variables.
.TP 3n
\(bu
To indicate explicitly that a variable is a session variable, precede its name by
SESSION,
@@session., or
@@. Setting a session variable requires no special privilege, but a client can change only its own session variables, not those of any other client.
.TP 3n
\(bu
LOCAL
and
@@local.
are synonyms for
SESSION
and
@@session..
.TP 3n
\(bu
If no modifier is present,
SET
changes the session variable.
.sp
.RE
.PP
A
SET
statement can contain multiple variable assignments, separated by commas. If you set several system variables, the most recent
GLOBAL
or
SESSION
modifier in the statement is used for following variables that have no modifier specified.
.PP
Examples:
.sp
.RS 3n
.nf
SET sort_buffer_size=10000;
SET @@local.sort_buffer_size=10000;
SET GLOBAL sort_buffer_size=1000000, SESSION sort_buffer_size=1000000;
SET @@sort_buffer_size=1000000;
SET @@global.sort_buffer_size=1000000, @@local.sort_buffer_size=1000000;
.fi
.RE
.PP
When you assign a value to a system variable with
SET, you cannot use suffix letters in the value (as can be done with startup options). However, the value can take the form of an expression:
.sp
.RS 3n
.nf
SET sort_buffer_size = 10 * 1024 * 1024;
.fi
.RE
.PP
The
@@\fIvar_name\fR
syntax for system variables is supported for compatibility with some other database systems.
.PP
If you change a session system variable, the value remains in effect until your session ends or until you change the variable to a different value. The change is not visible to other clients.
.PP
If you change a global system variable, the value is remembered and used for new connections until the server restarts. (To make a global system variable setting permanent, you should set it in an option file.) The change is visible to any client that accesses that global variable. However, the change affects the corresponding session variable only for clients that connect after the change. The global variable change does not affect the session variable for any client that is currently connected (not even that of the client that issues the
SET GLOBAL
statement).
.PP
To prevent incorrect usage, MySQL produces an error if you use
SET GLOBAL
with a variable that can only be used with
SET SESSION
or if you do not specify
GLOBAL
(or
@@global.) when setting a global variable.
.PP
To set a
SESSION
variable to the
GLOBAL
value or a
GLOBAL
value to the compiled\-in MySQL default value, use the
DEFAULT
keyword. For example, the following two statements are identical in setting the session value of
max_join_size
to the global value:
.sp
.RS 3n
.nf
SET max_join_size=DEFAULT;
SET @@session.max_join_size=@@global.max_join_size;
.fi
.RE
.PP
Not all system variables can be set to
DEFAULT. In such cases, use of
DEFAULT
results in an error.
.PP
You can refer to the values of specific global or sesson system variables in expressions by using one of the
@@\-modifiers. For example, you can retrieve values in a
SELECT
statement like this:
.sp
.RS 3n
.nf
SELECT @@global.sql_mode, @@session.sql_mode, @@sql_mode;
.fi
.RE
.PP
When you refer to a system variable in an expression as
@@\fIvar_name\fR
(that is, when you do not specify
@@global.
or
@@session.), MySQL returns the session value if it exists and the global value otherwise. (This differs from
SET @@\fIvar_name\fR = \fIvalue\fR, which always refers to the session value.)
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
Some system variables can be enabled with the
SET
statement by setting them to
ON
or
1, or disabled by setting them to
OFF
or
0. However, to set such a variable on the command line or in an option file, you must set it to
1
or
0; setting it to
ON
or
OFF
will not work. For example, on the command line,
\fB\-\-delay_key_write=1\fR
works but
\fB\-\-delay_key_write=ON\fR
does not.
.PP
To display system variable names and values, use the
SHOW VARIABLES
statement:
.sp
.RS 3n
.nf
mysql> \fBSHOW VARIABLES;\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| automatic_sp_privileges | ON |
| back_log | 50 |
| basedir | /home/mysql/ |
| binlog_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /home/mysql/share/mysql/charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
...
| innodb_additional_mem_pool_size | 1048576 |
| innodb_autoextend_increment | 8 |
| innodb_buffer_pool_awe_mem_mb | 0 |
| innodb_buffer_pool_size | 8388608 |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
...
| version | 5.1.6\-alpha\-log |
| version_comment | Source distribution |
| version_compile_machine | i686 |
| version_compile_os | suse\-linux |
| wait_timeout | 28800 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.RE
.PP
With a
LIKE
clause, the statement displays only those variables that match the pattern. To obtain a specific variable name, use a
LIKE
clause as shown:
.sp
.RS 3n
.nf
SHOW VARIABLES LIKE 'max_join_size';
SHOW SESSION VARIABLES LIKE 'max_join_size';
.fi
.RE
.PP
To get a list of variables whose name match a pattern, use the \(oq%\(cq wildcard character in a
LIKE
clause:
.sp
.RS 3n
.nf
SHOW VARIABLES LIKE '%size%';
SHOW GLOBAL VARIABLES LIKE '%size%';
.fi
.RE
.PP
Wildcard characters can be used in any position within the pattern to be matched. Strictly speaking, because \(oq_\(cq is a wildcard that matches any single character, you should escape it as \(oq\\_\(cq to match it literally. In practice, this is rarely necessary.
.PP
For
SHOW VARIABLES, if you specify neither
GLOBAL
nor
SESSION, MySQL returns
SESSION
values.
.PP
The reason for requiring the
GLOBAL
keyword when setting
GLOBAL\-only variables but not when retrieving them is to prevent problems in the future. If we were to remove a
SESSION
variable that has the same name as a
GLOBAL
variable, a client with the
SUPER
privilege might accidentally change the
GLOBAL
variable rather than just the
SESSION
variable for its own connection. If we add a
SESSION
variable with the same name as a
GLOBAL
variable, a client that intends to change the
GLOBAL
variable might find only its own
SESSION
variable changed.
.SS "Structured System Variables"
.PP
A structured variable differs from a regular system variable in two respects:
.TP 3n
\(bu
Its value is a structure with components that specify server parameters considered to be closely related.
.TP 3n
\(bu
There might be several instances of a given type of structured variable. Each one has a different name and refers to a different resource maintained by the server.
.sp
.RE
.PP
MySQL 5.1 supports one structured variable type, which specifies parameters governing the operation of key caches. A key cache structured variable has these components:
.TP 3n
\(bu
key_buffer_size
.TP 3n
\(bu
key_cache_block_size
.TP 3n
\(bu
key_cache_division_limit
.TP 3n
\(bu
key_cache_age_threshold
.sp
.RE
.PP
This section describes the syntax for referring to structured variables. Key cache variables are used for syntax examples, but specific details about how key caches operate are found elsewhere, in
Section\ 4.6, \(lqThe MyISAM Key Cache\(rq.
.PP
To refer to a component of a structured variable instance, you can use a compound name in
\fIinstance_name.component_name\fR
format. Examples:
.sp
.RS 3n
.nf
hot_cache.key_buffer_size
hot_cache.key_cache_block_size
cold_cache.key_cache_block_size
.fi
.RE
.PP
For each structured system variable, an instance with the name of
default
is always predefined. If you refer to a component of a structured variable without any instance name, the
default
instance is used. Thus,
default.key_buffer_size
and
key_buffer_size
both refer to the same system variable.
.PP
Structured variable instances and components follow these naming rules:
.TP 3n
\(bu
For a given type of structured variable, each instance must have a name that is unique
\fIwithin\fR
variables of that type. However, instance names need not be unique
\fIacross\fR
structured variable types. For example, each structured variable has an instance named
default, so
default
is not unique across variable types.
.TP 3n
\(bu
The names of the components of each structured variable type must be unique across all system variable names. If this were not true (that is, if two different types of structured variables could share component member names), it would not be clear which default structured variable to use for references to member names that are not qualified by an instance name.
.TP 3n
\(bu
If a structured variable instance name is not legal as an unquoted identifier, refer to it as a quoted identifier using backticks. For example,
hot\-cache
is not legal, but
`hot\-cache`
is.
.TP 3n
\(bu
global,
session, and
local
are not legal instance names. This avoids a conflict with notation such as
@@global.\fIvar_name\fR
for referring to non\-structured system variables.
.sp
.RE
.PP
Currently, the first two rules have no possibility of being violated because the only structured variable type is the one for key caches. These rules will assume greater significance if some other type of structured variable is created in the future.
.PP
With one exception, you can refer to structured variable components using compound names in any context where simple variable names can occur. For example, you can assign a value to a structured variable using a command\-line option:
.sp
.RS 3n
.nf
shell> \fBmysqld \-\-hot_cache.key_buffer_size=64K\fR
.fi
.RE
.PP
In an option file, use this syntax:
.sp
.RS 3n
.nf
[mysqld]
hot_cache.key_buffer_size=64K
.fi
.RE
.PP
If you start the server with this option, it creates a key cache named
hot_cache
with a size of 64KB in addition to the default key cache that has a default size of 8MB.
.PP
Suppose that you start the server as follows:
.sp
.RS 3n
.nf
shell> \fBmysqld \-\-key_buffer_size=256K \\\fR
\fB\-\-extra_cache.key_buffer_size=128K \\\fR
\fB\-\-extra_cache.key_cache_block_size=2048\fR
.fi
.RE
.PP
In this case, the server sets the size of the default key cache to 256KB. (You could also have written
\fB\-\-default.key_buffer_size=256K\fR.) In addition, the server creates a second key cache named
extra_cache
that has a size of 128KB, with the size of block buffers for caching table index blocks set to 2048 bytes.
.PP
The following example starts the server with three different key caches having sizes in a 3:1:1 ratio:
.sp
.RS 3n
.nf
shell> \fBmysqld \-\-key_buffer_size=6M \\\fR
\fB\-\-hot_cache.key_buffer_size=2M \\\fR
\fB\-\-cold_cache.key_buffer_size=2M\fR
.fi
.RE
.PP
Structured variable values may be set and retrieved at runtime as well. For example, to set a key cache named
hot_cache
to a size of 10MB, use either of these statements:
.sp
.RS 3n
.nf
mysql> \fBSET GLOBAL hot_cache.key_buffer_size = 10*1024*1024;\fR
mysql> \fBSET @@global.hot_cache.key_buffer_size = 10*1024*1024;\fR
.fi
.RE
.PP
To retrieve the cache size, do this:
.sp
.RS 3n
.nf
mysql> \fBSELECT @@global.hot_cache.key_buffer_size;\fR
.fi
.RE
.PP
However, the following statement does not work. The variable is not interpreted as a compound name, but as a simple string for a
LIKE
pattern\-matching operation:
.sp
.RS 3n
.nf
mysql> \fBSHOW GLOBAL VARIABLES LIKE 'hot_cache.key_buffer_size';\fR
.fi
.RE
.PP
This is the exception to being able to use structured variable names anywhere a simple variable name may occur.
.\" end of SS subsection "Structured System Variables"
.SS "Dynamic System Variables"
.PP
Many server system variables are dynamic and can be set at runtime using
SET GLOBAL
or
SET SESSION. You can also obtain their values using
SELECT. See
the section called \(lqUSING SYSTEM VARIABLES\(rq.
.PP
The following table shows the full list of all dynamic system variables. The last column indicates for each variable whether
GLOBAL
or
SESSION
(or both) apply. The table also lists session options that can be set with the
SET
statement.
Section\ 5.3, \(lqSET Syntax\(rq, discusses these options.
.PP
Variables that have a type of
\(lqstring\(rq
take a string value. Variables that have a type of
\(lqnumeric\(rq
take a numeric value. Variables that have a type of
\(lqboolean\(rq
can be set to 0, 1,
ON
or
OFF. (If you set them on the command line or in an option file, use the numeric values.) Variables that are marked as
\(lqenumeration\(rq
normally should be set to one of the available values for the variable, but can also be set to the number that corresponds to the desired enumeration value. For enumerated system variables, the first enumeration value corresponds to 0. This differs from
ENUM
columns, for which the first enumeration value corresponds to 1.
.TS
allbox tab(:);
lB cB cB.
T{
\fBVariable Name\fR
T}:T{
\fBVariable Type\fR
T}:T{
\fBVariable Scope\fR
T}
.T&
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c.
T{
autocommit
T}:T{
boolean
T}:T{
SESSION
T}
T{
character_set_system
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
net_write_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
old_passwords
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
optimizer_prune_level
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
optimizer_search_depth
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_autoextend_increment
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_checksums
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_commit_concurrency
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_concurrency_tickets
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_flush_log_at_trx_commit
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
plugin_innodb_max_dirty_pages_pct
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
collation_connection
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_max_purge_lag
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_support_xa
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
innodb_sync_spin_loops
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_table_locks
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_thread_concurrency
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
plugin_innodb_thread_sleep_delay
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
preload_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
query_alloc_block_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
query_cache_limit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
query_cache_min_res_unit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
collation_database
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
query_cache_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
query_cache_type
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
query_cache_wlock_invalidate
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
query_prealloc_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
range_alloc_block_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
read_only
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
read_rnd_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
rpl_recovery_rank
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
secure_auth
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
server_id
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
collation_server
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
slave\-allow\-batching
T}:T{
boolean
T}:T{
GLOBAL
T}
T{
slave_net_timeout
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
slave_transaction_retries
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
slow_launch_time
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
sort_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
sql_mode
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
sql_big_selects
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
sql_big_tables
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_buffer_result
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_log_bin
T}:T{
boolean
T}:T{
SESSION
T}
T{
completion_type
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
sql_log_off
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_log_update
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_low_priority_updates
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
sql_max_join_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
sql_notes
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
sql_quote_show_create
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_safe_updates
T}:T{
boolean
T}:T{
SESSION
T}
T{
sql_select_limit
T}:T{
numeric
T}:T{
SESSION
T}
T{
sql_slave_skip_counter
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
sql_warnings
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
concurrent_insert
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
sync_binlog
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
sync_frm
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
table_cache
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
table_lock_wait_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
table_open_cache
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
table_type
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
thread_cache_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
time_zone
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
timestamp
T}:T{
string
T}:T{
SESSION
T}
T{
tmp_table_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
connect_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
transaction_alloc_block_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
transaction_prealloc_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
tx_isolation
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
unique_checks
T}:T{
boolean
T}:T{
SESSION
T}
T{
wait_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
date_format
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
datetime_format
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
default_week_format
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
big_tables
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
delay_key_write
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
delayed_insert_limit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
delayed_insert_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
delayed_queue_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
div_precision_increment
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
engine_condition_pushdown
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
expire_logs_days
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
flush
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
flush_time
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
foreign_key_checks
T}:T{
boolean
T}:T{
SESSION
T}
T{
binlog_cache_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
ft_boolean_syntax
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
ft_max_word_len
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
ft_min_word_len
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
ft_query_expansion_limit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
ft_stopword_file
T}:T{
filename
T}:T{
GLOBAL | SESSION
T}
T{
group_concat_max_len
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
identity
T}:T{
numeric
T}:T{
SESSION
T}
T{
innodb_autoextend_increment
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_autoinc_lock_mode
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
innodb_checksums
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
bulk_insert_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_commit_concurrency
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_concurrency_tickets
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_flush_log_at_trx_commit
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
innodb_max_dirty_pages_pct
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_max_purge_lag
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_support_xa
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
innodb_sync_spin_loops
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
innodb_table_locks
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
innodb_thread_concurrency
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
innodb_thread_sleep_delay
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
character_set_server
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
insert_id
T}:T{
numeric
T}:T{
SESSION
T}
T{
interactive_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
join_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
keep_files_on_create
T}:T{
boolean
T}:T{
GLOBAL
T}
T{
key_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
last_insert_id
T}:T{
numeric
T}:T{
SESSION
T}
T{
lc_time_names
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
local_infile
T}:T{
boolean
T}:T{
GLOBAL
T}
T{
log_bin_trust_function_creators
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
log_queries_not_using_indexes
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
character_set_client
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
log_warnings
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
log_output
T}:T{
enumeration
T}:T{
GLOBAL
T}
T{
long_query_time
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
low_priority_updates
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_allowed_packet
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_binlog_cache_size
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_binlog_size
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_connect_errors
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_connections
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_delayed_threads
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
character_set_connection
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
max_error_count
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_heap_table_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_insert_delayed_threads
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_join_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_length_for_sort_data
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_prepared_stmt_count
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_relay_log_size
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
max_seeks_for_key
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_sort_length
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_sp_recursion_depth
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
character_set_database
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
max_tmp_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_user_connections
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
max_write_lock_count
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
multi_range_count
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
multi_read_range
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
myisam_block_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
myisam_data_pointer_size
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
myisam_max_sort_file_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
myisam_repair_threads
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
myisam_sort_buffer_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
character_set_results
T}:T{
string
T}:T{
GLOBAL | SESSION
T}
T{
myisam_stats_method
T}:T{
enumeration
T}:T{
GLOBAL | SESSION
T}
T{
ndb_autoincrement_prefetch_sz
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
ndb_cache_check_time
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
ndb_extra_logging
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
ndb_force_send
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
ndb_use_exact_count
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
ndbcluster
T}:T{
boolean
T}:T{
GLOBAL | SESSION
T}
T{
net_buffer_length
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
net_read_timeout
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
net_retry_count
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
.TE
.sp
.\" end of SS subsection "Dynamic System Variables"
.SH "STATUS VARIABLES"
.PP
The server maintains many status variables that provide information about its operation. You can view these variables and their values by using the
SHOW [GLOBAL] STATUS
statement. The optional
GLOBAL
keyword aggregates the values over all connections.
.sp
.RS 3n
.nf
mysql> \fBSHOW GLOBAL STATUS;\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+
| Variable_name | Value |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Bytes_received | 155372598 |
| Bytes_sent | 1176560426 |
...
| Connections | 30023 |
| Created_tmp_disk_tables | 0 |
| Created_tmp_files | 3 |
| Created_tmp_tables | 2 |
...
| Threads_created | 217 |
| Threads_running | 88 |
| Uptime | 1389872 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.RE
.PP
The following table lists all available server status variables:
.TS
allbox tab(:);
lB cB cB.
T{
\fBVariable Name\fR
T}:T{
\fBVariable Type\fR
T}:T{
\fBVariable Scope\fR
T}
.T&
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c
l c c.
T{
Aborted_clients
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_alter_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_fetch
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_prepare
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_reset
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_send_long_data
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_truncate
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_unlock_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_update
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_update_multi
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_commit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_end
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_analyze
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_prepare
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_recover
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_rollback
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_xa_start
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Compression
T}:T{
numeric
T}:T{
SESSION
T}
T{
Connections
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Created_tmp_disk_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Created_tmp_files
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Created_tmp_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Delayed_errors
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_backup_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Delayed_insert_threads
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Delayed_writes
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Flush_commands
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Handler_commit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_delete
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_discover
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_prepare
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_first
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_key
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_next
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_begin
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_prev
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_rnd
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_read_rnd_next
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_rollback
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_savepoint
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_savepoint_rollback
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_update
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Handler_write
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_data
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_dirty
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_call_procedure
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_flushed
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_free
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_latched
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_misc
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_pages_total
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_read_ahead_rnd
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_read_ahead_seq
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_read_requests
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_reads
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_wait_free
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_change_db
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_buffer_pool_write_requests
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_fsyncs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_pending_fsyncs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_pending_reads
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_pending_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_read
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_reads
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_data_written
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_dblwr_pages_written
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_change_master
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_dblwr_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_log_waits
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_log_write_requests
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_log_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_os_log_fsyncs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_os_log_pending_fsyncs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_os_log_pending_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_os_log_written
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_page_size
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_pages_created
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_check
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_pages_read
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_pages_written
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_row_lock_current_waits
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_row_lock_time
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_row_lock_time_avg
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_row_lock_time_max
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_row_lock_waits
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_rows_deleted
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_rows_inserted
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_rows_read
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_checksum
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Innodb_rows_updated
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_blocks_not_flushed
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_blocks_unused
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_blocks_used
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_read_requests
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_reads
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_write_requests
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Key_writes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Last_query_cost
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Max_used_connections
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_commit
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Ndb_cluster_node_id
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Ndb_config_from_host
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Ndb_config_from_port
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Ndb_conflict_fn_max
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Ndb_number_of_data_nodes
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Not_flushed_delayed_rows
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Open_files
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Open_streams
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Open_table_definitions
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Open_tables
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Aborted_connects
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_create_db
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Opened_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
prepared_stmt_count
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Qcache_free_blocks
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_free_memory
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_hits
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_inserts
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_lowmem_prunes
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_not_cached
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_queries_in_cache
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Qcache_total_blocks
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_create_event
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Questions
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Relay_Log_Space
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Rpl_status
T}:T{
\
T}:T{
GLOBAL
T}
T{
Select_full_join
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Select_full_range_join
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Select_range
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Select_range_check
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Select_scan
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Slave_open_temp_tables
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Slave_retried_transactions
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_create_function
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Slave_running
T}:T{
boolean
T}:T{
GLOBAL
T}
T{
Slow_launch_threads
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Slow_queries
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Sort_merge_passes
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Sort_range
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Sort_rows
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Sort_scan
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Table_locks_immediate
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Table_locks_waited
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Tc_log_max_pages_used
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_create_index
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Tc_log_page_size
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Tc_log_page_waits
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Threads_cached
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Threads_connected
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Threads_created
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Threads_running
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Uptime
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_create_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_create_user
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_dealloc_sql
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_delete
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_delete_multi
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_do
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Binlog_cache_disk_use
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_drop_db
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_drop_event
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_drop_function
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_drop_index
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_drop_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_drop_user
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_execute_sql
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_flush
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_grant
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_ha_close
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Binlog_cache_use
T}:T{
numeric
T}:T{
GLOBAL
T}
T{
Com_ha_open
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_ha_read
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_help
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_insert
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_insert_select
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_kill
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_load
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_lock_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_optimize
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_preload_keys
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Bytes_received
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_prepare_sql
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_purge
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_purge_before_date
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_rename_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_repair
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_replace
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_replace_select
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_reset
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_restore_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_revoke
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Bytes_sent
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_revoke_all
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_rollback
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_savepoint
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_select
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_set_option
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_binlog_events
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_binlogs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_charsets
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_collations
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_column_types
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_admin_commands
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_create_db
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_create_event
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_create_table
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_databases
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_engine_logs
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_engine_mutex
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_engine_status
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_errors
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_events
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_fields
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_alter_db
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_grants
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_keys
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_master_status
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_new_master
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_open_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_plugins
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_privileges
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_processlist
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_slave_hosts
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_slave_status
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_alter_event
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_status
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_storage_engines
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_tables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_triggers
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_variables
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_show_warnings
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_slave_start
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_slave_stop
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_close
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
T{
Com_stmt_execute
T}:T{
numeric
T}:T{
GLOBAL | SESSION
T}
.TE
.sp
.PP
Many status variables are reset to 0 by the
FLUSH STATUS
statement.
.PP
The status variables have the following meanings. Variables with no version indicated were already present prior to MySQL 5.1. For information regarding their implementation history, see
MySQL 5.0 Reference Manual.
.TP 3n
\(bu
Aborted_clients
.sp
The number of connections that were aborted because the client died without closing the connection properly. See
Section\ 1.2.10, \(lqCommunication Errors and Aborted Connections\(rq.
.TP 3n
\(bu
Aborted_connects
.sp
The number of failed attempts to connect to the MySQL server. See
Section\ 1.2.10, \(lqCommunication Errors and Aborted Connections\(rq.
.TP 3n
\(bu
Binlog_cache_disk_use
.sp
The number of transactions that used the temporary binary log cache but that exceeded the value of
binlog_cache_size
and used a temporary file to store statements from the transaction.
.TP 3n
\(bu
Binlog_cache_use
.sp
The number of transactions that used the temporary binary log cache.
.TP 3n
\(bu
Bytes_received
.sp
The number of bytes received from all clients.
.TP 3n
\(bu
Bytes_sent
.sp
The number of bytes sent to all clients.
.TP 3n
\(bu
Com_\fIxxx\fR
.sp
The
Com_\fIxxx\fR
statement counter variables indicate the number of times each
\fIxxx\fR
statement has been executed. There is one status variable for each type of statement. For example,
Com_delete
and
Com_insert
count
DELETE
and
INSERT
statements, respectively. However, if a query result is returned from query cache, the server increments the
Qcache_hits
status variable, not
Com_select. See
Section\ 5.4.4, \(lqQuery Cache Status and Maintenance\(rq.
.sp
All of the
Com_STATEMENT_\fIxxx\fR
variables are increased even if a prepared statement argument is unknown or an error occurred during execution. In other words, their values correspond to the number of requests issued, not to the number of requests successfully completed.
.sp
The
Com_STATEMENT_\fIxxx\fR
status variables are as follows:
.RS 3n
.TP 3n
\(bu
Com_STATEMENT_prepare
.TP 3n
\(bu
Com_STATEMENT_execute
.TP 3n
\(bu
Com_STATEMENT_fetch
.TP 3n
\(bu
Com_STATEMENT_send_long_data
.TP 3n
\(bu
Com_STATEMENT_reset
.TP 3n
\(bu
Com_STATEMENT_close
.RE
.IP "" 3n
Those variables stand for prepared statement commands. Their names refer to the
COM_\fIxxx\fR
command set used in the network layer. In other words, their values increase whenever prepared statement API calls such as
\fBmysql_STATEMENT_prepare()\fR,
\fBmysql_STATEMENT_execute()\fR, and so forth are executed. However,
Com_STATEMENT_prepare,
Com_STATEMENT_execute
and
Com_STATEMENT_close
also increase for
PREPARE,
EXECUTE, or
DEALLOCATE PREPARE, respectively. Additionally, the values of the older (available since MySQL 4.1.3) statement counter variables
Com_prepare_sql,
Com_execute_sql, and
Com_dealloc_sql
increase for the
PREPARE,
EXECUTE, and
DEALLOCATE PREPARE
statements.
Com_STATEMENT_fetch
stands for the total number of network round\-trips issued when fetching from cursors.
.TP 3n
\(bu
Compression
.sp
Whether the client connection uses compression in the client/server protocol. Added in MySQL 5.1.2.
.TP 3n
\(bu
Connections
.sp
The number of connection attempts (successful or not) to the MySQL server.
.TP 3n
\(bu
Created_tmp_disk_tables
.sp
The number of temporary tables on disk created automatically by the server while executing statements.
.TP 3n
\(bu
Created_tmp_files
.sp
How many temporary files
\fBmysqld\fR
has created.
.TP 3n
\(bu
Created_tmp_tables
.sp
The number of in\-memory temporary tables created automatically by the server while executing statements. If
Created_tmp_disk_tables
is large, you may want to increase the
tmp_table_size
value to cause temporary tables to be memory\-based instead of disk\-based.
.TP 3n
\(bu
Delayed_errors
.sp
The number of rows written with
INSERT DELAYED
for which some error occurred (probably
duplicate key).
.TP 3n
\(bu
Delayed_insert_threads
.sp
The number of
INSERT DELAYED
handler threads in use.
.TP 3n
\(bu
Delayed_writes
.sp
The number of
INSERT DELAYED
rows written.
.TP 3n
\(bu
Flush_commands
.sp
The number of executed
FLUSH
statements.
.TP 3n
\(bu
Handler_commit
.sp
The number of internal
COMMIT
statements.
.TP 3n
\(bu
Handler_delete
.sp
The number of times that rows have been deleted from tables.
.TP 3n
\(bu
Handler_discover
.sp
The MySQL server can ask the
NDB Cluster
storage engine if it knows about a table with a given name. This is called discovery.
Handler_discover
indicates the number of times that tables have been discovered via this mechanism.
.TP 3n
\(bu
Handler_prepare
.sp
A counter for the prepare phase of two\-phase commit operations.
.TP 3n
\(bu
Handler_read_first
.sp
The number of times the first entry was read from an index. If this value is high, it suggests that the server is doing a lot of full index scans; for example,
SELECT col1 FROM foo, assuming that
col1
is indexed.
.TP 3n
\(bu
Handler_read_key
.sp
The number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.
.TP 3n
\(bu
Handler_read_next
.sp
The number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.
.TP 3n
\(bu
Handler_read_prev
.sp
The number of requests to read the previous row in key order. This read method is mainly used to optimize
ORDER BY ... DESC.
.TP 3n
\(bu
Handler_read_rnd
.sp
The number of requests to read a row based on a fixed position. This value is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan entire tables or you have joins that don't use keys properly.
.TP 3n
\(bu
Handler_read_rnd_next
.sp
The number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
.TP 3n
\(bu
Handler_rollback
.sp
The number of requests for a storage engine to perform a rollback operation.
.TP 3n
\(bu
Handler_savepoint
.sp
The number of requests for a storage engine to place a savepoint.
.TP 3n
\(bu
Handler_savepoint_rollback
.sp
The number of requests for a storage engine to roll back to a savepoint.
.TP 3n
\(bu
Handler_update
.sp
The number of requests to update a row in a table.
.TP 3n
\(bu
Handler_write
.sp
The number of requests to insert a row in a table.
.TP 3n
\(bu
Innodb_buffer_pool_pages_data
.sp
The number of pages containing data (dirty or clean).
.TP 3n
\(bu
Innodb_buffer_pool_pages_dirty
.sp
The number of pages currently dirty.
.TP 3n
\(bu
Innodb_buffer_pool_pages_flushed
.sp
The number of buffer pool page\-flush requests.
.TP 3n
\(bu
Innodb_buffer_pool_pages_free
.sp
The number of free pages.
.TP 3n
\(bu
Innodb_buffer_pool_pages_latched
.sp
The number of latched pages in
InnoDB
buffer pool. These are pages currently being read or written or that cannot be flushed or removed for some other reason.
.TP 3n
\(bu
Innodb_buffer_pool_pages_misc
.sp
The number of pages that are busy because they have been allocated for administrative overhead such as row locks or the adaptive hash index. This value can also be calculated as
Innodb_buffer_pool_pages_total
\(en
Innodb_buffer_pool_pages_free
\(en
Innodb_buffer_pool_pages_data.
.TP 3n
\(bu
Innodb_buffer_pool_pages_total
.sp
The total size of the buffer pool, in pages.
.TP 3n
\(bu
Innodb_buffer_pool_read_ahead_rnd
.sp
The number of
\(lqrandom\(rq
read\-aheads initiated by
InnoDB. This happens when a query scans a large portion of a table but in random order.
.TP 3n
\(bu
Innodb_buffer_pool_read_ahead_seq
.sp
The number of sequential read\-aheads initiated by
InnoDB. This happens when
InnoDB
does a sequential full table scan.
.TP 3n
\(bu
Innodb_buffer_pool_read_requests
.sp
The number of logical read requests
InnoDB
has done.
.TP 3n
\(bu
Innodb_buffer_pool_reads
.sp
The number of logical reads that
InnoDB
could not satisfy from the buffer pool and had to do a single\-page read.
.TP 3n
\(bu
Innodb_buffer_pool_wait_free
.sp
Normally, writes to the
InnoDB
buffer pool happen in the background. However, if it is necessary to read or create a page and no clean pages are available, it is also necessary to wait for pages to be flushed first. This counter counts instances of these waits. If the buffer pool size has been set properly, this value should be small.
.TP 3n
\(bu
Innodb_buffer_pool_write_requests
.sp
The number writes done to the
InnoDB
buffer pool.
.TP 3n
\(bu
Innodb_data_fsyncs
.sp
The number of
fsync()
operations so far.
.TP 3n
\(bu
Innodb_data_pending_fsyncs
.sp
The current number of pending
fsync()
operations.
.TP 3n
\(bu
Innodb_data_pending_reads
.sp
The current number of pending reads.
.TP 3n
\(bu
Innodb_data_pending_writes
.sp
The current number of pending writes.
.TP 3n
\(bu
Innodb_data_read
.sp
The amount of data read so far, in bytes.
.TP 3n
\(bu
Innodb_data_reads
.sp
The total number of data reads.
.TP 3n
\(bu
Innodb_data_writes
.sp
The total number of data writes.
.TP 3n
\(bu
Innodb_data_written
.sp
The amount of data written so far, in bytes.
.TP 3n
\(bu
Innodb_dblwr_writes,
Innodb_dblwr_pages_written
.sp
The number of doublewrite operations that have been performed and the number of pages that have been written for this purpose. See
Section\ 5.14.1, \(lqInnoDB Disk I/O\(rq.
.TP 3n
\(bu
Innodb_log_waits
.sp
The number of times that the log buffer was too small and a wait was required for it to be flushed before continuing.
.TP 3n
\(bu
Innodb_log_write_requests
.sp
The number of log write requests.
.TP 3n
\(bu
Innodb_log_writes
.sp
The number of physical writes to the log file.
.TP 3n
\(bu
Innodb_os_log_fsyncs
.sp
The number of
fsync()
writes done to the log file.
.TP 3n
\(bu
Innodb_os_log_pending_fsyncs
.sp
The number of pending log file
fsync()
operations.
.TP 3n
\(bu
Innodb_os_log_pending_writes
.sp
The number of pending log file writes.
.TP 3n
\(bu
Innodb_os_log_written
.sp
The number of bytes written to the log file.
.TP 3n
\(bu
Innodb_page_size
.sp
The compiled\-in
InnoDB
page size (default 16KB). Many values are counted in pages; the page size allows them to be easily converted to bytes.
.TP 3n
\(bu
Innodb_pages_created
.sp
The number of pages created.
.TP 3n
\(bu
Innodb_pages_read
.sp
The number of pages read.
.TP 3n
\(bu
Innodb_pages_written
.sp
The number of pages written.
.TP 3n
\(bu
Innodb_row_lock_current_waits
.sp
The number of row locks currently being waited for.
.TP 3n
\(bu
Innodb_row_lock_time
.sp
The total time spent in acquiring row locks, in milliseconds.
.TP 3n
\(bu
Innodb_row_lock_time_avg
.sp
The average time to acquire a row lock, in milliseconds.
.TP 3n
\(bu
Innodb_row_lock_time_max
.sp
The maximum time to acquire a row lock, in milliseconds.
.TP 3n
\(bu
Innodb_row_lock_waits
.sp
The number of times a row lock had to be waited for.
.TP 3n
\(bu
Innodb_rows_deleted
.sp
The number of rows deleted from
InnoDB
tables.
.TP 3n
\(bu
Innodb_rows_inserted
.sp
The number of rows inserted into
InnoDB
tables.
.TP 3n
\(bu
Innodb_rows_read
.sp
The number of rows read from
InnoDB
tables.
.TP 3n
\(bu
Innodb_rows_updated
.sp
The number of rows updated in
InnoDB
tables.
.TP 3n
\(bu
Key_blocks_not_flushed
.sp
The number of key blocks in the key cache that have changed but have not yet been flushed to disk.
.TP 3n
\(bu
Key_blocks_unused
.sp
The number of unused blocks in the key cache. You can use this value to determine how much of the key cache is in use; see the discussion of
key_buffer_size
in
the section called \(lqSYSTEM VARIABLES\(rq.
.TP 3n
\(bu
Key_blocks_used
.sp
The number of used blocks in the key cache. This value is a high\-water mark that indicates the maximum number of blocks that have ever been in use at one time.
.TP 3n
\(bu
Key_read_requests
.sp
The number of requests to read a key block from the cache.
.TP 3n
\(bu
Key_reads
.sp
The number of physical reads of a key block from disk. If
Key_reads
is large, then your
key_buffer_size
value is probably too small. The cache miss rate can be calculated as
Key_reads/Key_read_requests.
.TP 3n
\(bu
Key_write_requests
.sp
The number of requests to write a key block to the cache.
.TP 3n
\(bu
Key_writes
.sp
The number of physical writes of a key block to disk.
.TP 3n
\(bu
Last_query_cost
.sp
The total cost of the last compiled query as computed by the query optimizer. This is useful for comparing the cost of different query plans for the same query. The default value of 0 means that no query has been compiled yet. The default value is 0.
Last_query_cost
has session scope.
.TP 3n
\(bu
Max_used_connections
.sp
The maximum number of connections that have been in use simultaneously since the server started.
.TP 3n
\(bu
Ndb_cluster_node_id
.sp
If the server is acting as a MySQL Cluster node, then the value of this variable its node ID in the cluster.
.sp
If the server is not part of a MySQL Cluster, then the value of this variable is 0.
.TP 3n
\(bu
Ndb_config_from_host
.sp
If the server is part of a MySQL Cluster, the value of this variable is the hostname or IP address of the Cluster management server from which it gets its configuration data.
.sp
If the server is not part of a MySQL Cluster, then the value of this variable is an empty string.
.sp
Prior to MySQL 5.1.12, this variable was named
Ndb_connected_host.
.TP 3n
\(bu
Ndb_config_from_port
.sp
If the server is part of a MySQL Cluster, the value of this variable is the number of the port through which it is connected to the Cluster management server from which it gets its configuration data.
.sp
If the server is not part of a MySQL Cluster, then the value of this variable is 0.
.sp
Prior to MySQL 5.1.12, this variable was named
Ndb_connected_port.
.TP 3n
\(bu
Ndb_number_of_data_nodes
.sp
If the server is part of a MySQL Cluster, the value of this variable is the number of data nodes in the cluster.
.sp
If the server is not part of a MySQL Cluster, then the value of this variable is 0.
.sp
Prior to MySQL 5.1.12, this variable was named
Ndb_number_of_storage_nodes.
.TP 3n
\(bu
Not_flushed_delayed_rows
.sp
The number of rows waiting to be written in
INSERT DELAY
queues.
.TP 3n
\(bu
Open_files
.sp
The number of files that are open.
.TP 3n
\(bu
Open_streams
.sp
The number of streams that are open (used mainly for logging).
.TP 3n
\(bu
Open_table_definitions
.sp
The number of cached
.frm
files. This variable was added in MySQL 5.1.3.
.TP 3n
\(bu
Open_tables
.sp
The number of tables that are open.
.TP 3n
\(bu
Opened_tables
.sp
The number of tables that have been opened. If
Opened_tables
is big, your
table_open_cache
value is probably too small.
.TP 3n
\(bu
Prepared_STATEMENT_count
.sp
The current number of prepared statements. (The maximum number of statements is given by the
max_prepared_STATEMENT_count
system variable.) This variable was added in MySQL 5.1.14.
.TP 3n
\(bu
Qcache_free_blocks
.sp
The number of free memory blocks in the query cache.
.TP 3n
\(bu
Qcache_free_memory
.sp
The amount of free memory for the query cache.
.TP 3n
\(bu
Qcache_hits
.sp
The number of query cache hits.
.TP 3n
\(bu
Qcache_inserts
.sp
The number of queries added to the query cache.
.TP 3n
\(bu
Qcache_lowmem_prunes
.sp
The number of queries that were deleted from the query cache because of low memory.
.TP 3n
\(bu
Qcache_not_cached
.sp
The number of non\-cached queries (not cacheable, or not cached due to the
query_cache_type
setting).
.TP 3n
\(bu
Qcache_queries_in_cache
.sp
The number of queries registered in the query cache.
.TP 3n
\(bu
Qcache_total_blocks
.sp
The total number of blocks in the query cache.
.TP 3n
\(bu
Questions
.sp
The number of statements that clients have sent to the server.
.TP 3n
\(bu
Rpl_status
.sp
The status of fail\-safe replication (not yet implemented).
.TP 3n
\(bu
Select_full_join
.sp
The number of joins that perform table scans because they do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.
.TP 3n
\(bu
Select_full_range_join
.sp
The number of joins that used a range search on a reference table.
.TP 3n
\(bu
Select_range
.sp
The number of joins that used ranges on the first table.
This is normally not a critical issue even if the value is quite large.
.TP 3n
\(bu
Select_range_check
.sp
The number of joins without keys that check for key usage after each row. If this is not 0, you should carefully check the indexes of your tables.
.TP 3n
\(bu
Select_scan
.sp
The number of joins that did a full scan of the first table.
.TP 3n
\(bu
Slave_open_temp_tables
.sp
The number of temporary tables that the slave SQL thread currently has open.
.TP 3n
\(bu
Slave_running
.sp
This is
ON
if this server is a slave that is connected to a master.
.TP 3n
\(bu
Slave_retried_transactions
.sp
The total number of times since startup that the replication slave SQL thread has retried transactions.
.TP 3n
\(bu
Slow_launch_threads
.sp
The number of threads that have taken more than
slow_launch_time
seconds to create.
.TP 3n
\(bu
Slow_queries
.sp
The number of queries that have taken more than
long_query_time
seconds. See
Section\ 9.5, \(lqThe Slow Query Log\(rq.
.TP 3n
\(bu
Sort_merge_passes
.sp
The number of merge passes that the sort algorithm has had to do. If this value is large, you should consider increasing the value of the
sort_buffer_size
system variable.
.TP 3n
\(bu
Sort_range
.sp
The number of sorts that were done using ranges.
.TP 3n
\(bu
Sort_rows
.sp
The number of sorted rows.
.TP 3n
\(bu
Sort_scan
.sp
The number of sorts that were done by scanning the table.
.TP 3n
\(bu
Ssl_\fIxxx\fR
.sp
Variables used for SSL connections.
.TP 3n
\(bu
Table_locks_immediate
.sp
The number of times that a table lock was acquired immediately.
.TP 3n
\(bu
Table_locks_waited
.sp
The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.
.TP 3n
\(bu
Tc_log_max_pages_used
.sp
For the memory\-mapped implementation of the log that is used by
\fBmysqld\fR
when it acts as the transaction coordinator for recovery of internal XA transactions, this variable indicates the largest number of pages used for the log since the server started. If the product of
Tc_log_max_pages_used
and
Tc_log_page_size
is always significantly less than the log size, the size is larger than necessary and can be reduced. (The size is set by the
\fB\-\-log\-tc\-size\fR
option. Currently, this variable is unused: It is unneeded for binary log\-based recovery, and the memory\-mapped recovery log method is not used unless the number of storage engines capable of two\-phase commit is greater than one. (InnoDB
is the only applicable engine.)
.TP 3n
\(bu
Tc_log_page_size
.sp
The page size used for the memory\-mapped implementation of the XA recovery log. The default value is determined using
getpagesize(). Currently, this variable is unused for the same reasons as described for
Tc_log_max_pages_used.
.TP 3n
\(bu
Tc_log_page_waits
.sp
For the memory\-mapped implementation of the recovery log, this variable increments each time the server was not able to commit a transaction and had to wait for a free page in the log. If this value is large, you might want to increase the log size (with the
\fB\-\-log\-tc\-size\fR
option). For binary log\-based recovery, this variable increments each time the binary log cannot be closed because there are two\-phase commits in progress. (The close operation waits until all such transactions are finished.)
.TP 3n
\(bu
Threads_cached
.sp
The number of threads in the thread cache.
.TP 3n
\(bu
Threads_connected
.sp
The number of currently open connections.
.TP 3n
\(bu
Threads_created
.sp
The number of threads created to handle connections. If
Threads_created
is big, you may want to increase the
thread_cache_size
value. The cache miss rate can be calculated as
Threads_created/Connections.
.TP 3n
\(bu
Threads_running
.sp
The number of threads that are not sleeping.
.TP 3n
\(bu
Uptime
.sp
The number of seconds that the server has been up.
.SH "SQL MODES"
.PP
The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients. This capability enables each application to tailor the server's operating mode to its own requirements.
.PP
For answers to some questions that are often asked about server SQL modes in MySQL, see
Section\ 3, \(lqMySQL 5.1 FAQ \(em Server SQL Mode\(rq.
.PP
Modes define what SQL syntax MySQL should support and what kind of data validation checks it should perform. This makes it easier to use MySQL in different environments and to use MySQL together with other database servers.
.PP
You can set the default SQL mode by starting
\fBmysqld\fR
with the
\fB\-\-sql\-mode="\fR\fB\fImodes\fR\fR\fB"\fR
option, or by using
\fBsql\-mode="\fR\fB\fImodes\fR\fR\fB"\fR
in
\fImy.cnf\fR
(Unix operating systems) or
\fImy.ini\fR
(Windows).
\fImodes\fR
is a list of different modes separated by comma (\(lq,\(rq) characters. The default value is empty (no modes set). The
\fImodes\fR
value also can be empty (\fB\-\-sql\-mode=""\fR
on the command line, or
\fBsql\-mode=""\fR
in
\fImy.cnf\fR
on Unix systems or in
\fImy.ini\fR
on Windows) if you want to clear it explicitly.
.PP
You can change the SQL mode at runtime by using a
SET [GLOBAL|SESSION] sql_mode='\fImodes\fR'
statement to set the
sql_mode
system value. Setting the
GLOBAL
variable requires the
SUPER
privilege and affects the operation of all clients that connect from that time on. Setting the
SESSION
variable affects only the current client. Any client can change its own session
sql_mode
value at any time.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBImportant\fR
.PP
\fBSQL mode and user\-defined partitioning\fR. Changing the server SQL mode after creating and inserting data into partitioned tables can cause major changes in the behavior of such tables, and could lead to loss or corruption of data. It is strongly recommended that you never change the SQL mode once you have created tables employing user\-defined partitioning.
.PP
See
Section\ 5, \(lqRestrictions and Limitations on Partitioning\(rq, for more information.
.PP
You can retrieve the current global or session
sql_mode
value with the following statements:
.sp
.RS 3n
.nf
SELECT @@global.sql_mode;
SELECT @@session.sql_mode;
.fi
.RE
.PP
The most important
sql_mode
values are probably these:
.TP 3n
\(bu
ANSI
.sp
This mode changes syntax and behavior to conform more closely to standard SQL.
.TP 3n
\(bu
STRICT_TRANS_TABLES
.sp
If a value could not be inserted as given into a transactional table, abort the statement. For a non\-transactional table, abort the statement if the value occurs in a single\-row statement or the first row of a multiple\-row statement. More detail is given later in this section.
.TP 3n
\(bu
TRADITIONAL
.sp
Make MySQL behave like a
\(lqtraditional\(rq
SQL database system. A simple description of this mode is
\(lqgive an error instead of a warning\(rq
when inserting an incorrect value into a column.
\fBNote\fR: The
INSERT/UPDATE
aborts as soon as the error is noticed. This may not be what you want if you are using a non\-transactional storage engine, because data changes made prior to the error may not be rolled back, resulting in a
\(lqpartially done\(rq
update.
.sp
.RE
.PP
When this manual refers to
\(lqstrict mode,\(rq
it means a mode where at least one of
STRICT_TRANS_TABLES
or
STRICT_ALL_TABLES
is enabled.
.PP
The following list describes all supported modes:
.TP 3n
\(bu
ALLOW_INVALID_DATES
.sp
Don't do full checking of dates. Check only that the month is in the range from 1 to 12 and the day is in the range from 1 to 31. This is very convenient for Web applications where you obtain year, month, and day in three different fields and you want to store exactly what the user inserted (without date validation). This mode applies to
DATE
and
DATETIME
columns. It does not apply
TIMESTAMP
columns, which always require a valid date.
.sp
The server requires that month and day values be legal, and not merely in the range 1 to 12 and 1 to 31, respectively. With strict mode disabled, invalid dates such as
\'2004\-04\-31'
are converted to
\'0000\-00\-00'
and a warning is generated. With strict mode enabled, invalid dates generate an error. To allow such dates, enable
ALLOW_INVALID_DATES.
.TP 3n
\(bu
ANSI_QUOTES
.sp
Treat \(oq"\(cq as an identifier quote character (like the \(oq`\(cq quote character) and not as a string quote character. You can still use \(oq`\(cq to quote identifiers with this mode enabled. With
ANSI_QUOTES
enabled, you cannot use double quotes to quote literal strings, because it is interpreted as an identifier.
.TP 3n
\(bu
ERROR_FOR_DIVISION_BY_ZERO
.sp
Produce an error in strict mode (otherwise a warning) when a division by zero (or
MOD(X,0)) occurs during an
INSERT
or
UPDATE. If this mode is not enabled, MySQL instead returns
NULL
for divisions by zero. For
INSERT IGNORE
or
UPDATE IGNORE, MySQL generates a warning for divisions by zero, but the result of the operation is
NULL.
.TP 3n
\(bu
HIGH_NOT_PRECEDENCE
.sp
The precedence of the
NOT
operator is such that expressions such as
NOT a BETWEEN b AND c
are parsed as
NOT (a BETWEEN b AND c). In some older versions of MySQL, the expression was parsed as
(NOT a) BETWEEN b AND c. The old higher\-precedence behavior can be obtained by enabling the
HIGH_NOT_PRECEDENCE
SQL mode.
.sp
.RS 3n
.nf
mysql> \fBSET sql_mode = '';\fR
mysql> \fBSELECT NOT 1 BETWEEN \-5 AND 5;\fR
\-> 0
mysql> \fBSET sql_mode = 'HIGH_NOT_PRECEDENCE';\fR
mysql> \fBSELECT NOT 1 BETWEEN \-5 AND 5;\fR
\-> 1
.fi
.RE
.TP 3n
\(bu
IGNORE_SPACE
.sp
Allow spaces between a function name and the \(oq(\(cq character. This causes built\-in function names to be treated as reserved words. As a result, identifiers that are the same as function names must be quoted as described in
Section\ 2, \(lqIdentifiers\(rq. For example, because there is a
COUNT()
function, the use of
count
as a table name in the following statement causes an error:
.sp
.RS 3n
.nf
mysql> \fBCREATE TABLE count (i INT);\fR
ERROR 1064 (42000): You have an error in your SQL syntax
.fi
.RE
The table name should be quoted:
.sp
.RS 3n
.nf
mysql> \fBCREATE TABLE `count` (i INT);\fR
Query OK, 0 rows affected (0.00 sec)
.fi
.RE
The
IGNORE_SPACE
SQL mode applies to built\-in functions, not to user\-defined functions or stored functions. It is always allowable to have spaces after a UDF or stored function name, regardless of whether
IGNORE_SPACE
is enabled.
.sp
For further discussion of
IGNORE_SPACE, see
Section\ 2.4, \(lqFunction Name Parsing and Resolution\(rq.
.TP 3n
\(bu
NO_AUTO_CREATE_USER
.sp
Prevent the
GRANT
statement from automatically creating new users if it would otherwise do so, unless a non\-empty password also is specified.
.TP 3n
\(bu
NO_AUTO_VALUE_ON_ZERO
.sp
NO_AUTO_VALUE_ON_ZERO
affects handling of
AUTO_INCREMENT
columns. Normally, you generate the next sequence number for the column by inserting either
NULL
or
0
into it.
NO_AUTO_VALUE_ON_ZERO
suppresses this behavior for
0
so that only
NULL
generates the next sequence number.
.sp
This mode can be useful if
0
has been stored in a table's
AUTO_INCREMENT
column. (Storing
0
is not a recommended practice, by the way.) For example, if you dump the table with
\fBmysqldump\fR
and then reload it, MySQL normally generates new sequence numbers when it encounters the
0
values, resulting in a table with contents different from the one that was dumped. Enabling
NO_AUTO_VALUE_ON_ZERO
before reloading the dump file solves this problem.
\fBmysqldump\fR
now automatically includes in its output a statement that enables
NO_AUTO_VALUE_ON_ZERO, to avoid this problem.
.TP 3n
\(bu
NO_BACKSLASH_ESCAPES
.sp
Disable the use of the backslash character (\(oq\\\(cq) as an escape character within strings. With this mode enabled, backslash becomes an ordinary character like any other.
.TP 3n
\(bu
NO_DIR_IN_CREATE
.sp
When creating a table, ignore all
INDEX DIRECTORY
and
DATA DIRECTORY
directives. This option is useful on slave replication servers.
.TP 3n
\(bu
NO_ENGINE_SUBSTITUTION
.sp
Control automatic substitution of the default storage engine when a statement such as
CREATE TABLE
or
ALTER TABLE
specifies a storage engine that is disabled or not compiled in.
.sp
Up through MySQL 5.1.11, with
NO_ENGINE_SUBSTITUTION
disabled, the default engine is used and a warning occurs if the desired engine is known but disabled or not compiled in. If the desired engine is invalid (not a known engine name), an error occurs and the table is not created or altered.
.sp
With
NO_ENGINE_SUBSTITUTION
enabled, an error occurs and the table is not created or altered if the desired engine is unavailable for any reason (whether disabled or invalid).
.sp
As of MySQL 5.1.12, storage engines can be pluggable at runtime, so the distinction between disabled and invalid no longer applies. All unavailable engines are treated the same way:
.sp
With
NO_ENGINE_SUBSTITUTION
disabled, for
CREATE TABLE
the default engine is used and a warning occurs if the desired engine is unavailable. For
ALTER TABLE, a warning occurs and the table is not altered.
.sp
With
NO_ENGINE_SUBSTITUTION
enabled, an error occurs and the table is not created or altered if the desired engine is unavailable.
.TP 3n
\(bu
NO_FIELD_OPTIONS
.sp
Do not print MySQL\-specific column options in the output of
SHOW CREATE TABLE. This mode is used by
\fBmysqldump\fR
in portability mode.
.TP 3n
\(bu
NO_KEY_OPTIONS
.sp
Do not print MySQL\-specific index options in the output of
SHOW CREATE TABLE. This mode is used by
\fBmysqldump\fR
in portability mode.
.TP 3n
\(bu
NO_TABLE_OPTIONS
.sp
Do not print MySQL\-specific table options (such as
ENGINE) in the output of
SHOW CREATE TABLE. This mode is used by
\fBmysqldump\fR
in portability mode.
.TP 3n
\(bu
NO_UNSIGNED_SUBTRACTION
.sp
In integer subtraction operations, do not mark the result as
UNSIGNED
if one of the operands is unsigned. In other words,
\fIthe result of a subtraction is always signed whenever this mode is in effect, even if one of the operands is unsigned\fR. For example, compare the type of column
c2
in table
t1
with that of column
c2
in table
t2:
.sp
.RS 3n
.nf
mysql> \fBSET SQL_MODE='';\fR
mysql> \fBCREATE TABLE test (c1 BIGINT UNSIGNED NOT NULL);\fR
mysql> \fBCREATE TABLE t1 SELECT c1 \- 1 AS c2 FROM test;\fR
mysql> \fBDESCRIBE t1;\fR
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Field | Type | Null | Key | Default | Extra |
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| c2 | bigint(21) unsigned | | | 0 | |
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
mysql> \fBSET SQL_MODE='NO_UNSIGNED_SUBTRACTION';\fR
mysql> \fBCREATE TABLE t2 SELECT c1 \- 1 AS c2 FROM test;\fR
mysql> \fBDESCRIBE t2;\fR
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| Field | Type | Null | Key | Default | Extra |
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
| c2 | bigint(21) | | | 0 | |
+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+
.fi
.RE
Note that this means that
BIGINT UNSIGNED
is not 100% usable in all contexts. See
Section\ 9, \(lqCast Functions and Operators\(rq.
.sp
.RS 3n
.nf
mysql> \fBSET SQL_MODE = '';\fR
mysql> \fBSELECT CAST(0 AS UNSIGNED) \- 1;\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| CAST(0 AS UNSIGNED) \- 1 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| 18446744073709551615 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
mysql> \fBSET SQL_MODE = 'NO_UNSIGNED_SUBTRACTION';\fR
mysql> \fBSELECT CAST(0 AS UNSIGNED) \- 1;\fR
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| CAST(0 AS UNSIGNED) \- 1 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| \-1 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.RE
.TP 3n
\(bu
NO_ZERO_DATE
.sp
In strict mode, don't allow
\'0000\-00\-00'
as a valid date. You can still insert zero dates with the
IGNORE
option. When not in strict mode, the date is accepted but a warning is generated.
.TP 3n
\(bu
NO_ZERO_IN_DATE
.sp
In strict mode, don't accept dates where the month or day part is 0. If used with the
IGNORE
option, MySQL inserts a
\'0000\-00\-00'
date for any such date. When not in strict mode, the date is accepted but a warning is generated.
.TP 3n
\(bu
ONLY_FULL_GROUP_BY
.sp
Do not allow queries for which the
SELECT
list refers to non\-aggregated columns that are not named in the
GROUP BY
clause. The following query is invalid with this mode enabled because
address
is not named in the
GROUP BY
clause:
.sp
.RS 3n
.nf
SELECT name, address, MAX(age) FROM t GROUP BY name;
.fi
.RE
As of MySQL 5.1.11, this mode also restricts references to non\-aggregated columns in the
HAVING
clause that are not named in the
GROUP BY
clause.
.TP 3n
\(bu
PIPES_AS_CONCAT
.sp
Treat
||
as a string concatenation operator (same as
CONCAT()) rather than as a synonym for
OR.
.TP 3n
\(bu
REAL_AS_FLOAT
.sp
Treat
REAL
as a synonym for
FLOAT. By default, MySQL treats
REAL
as a synonym for
DOUBLE.
.TP 3n
\(bu
STRICT_ALL_TABLES
.sp
Enable strict mode for all storage engines. Invalid data values are rejected. Additional detail follows.
.TP 3n
\(bu
STRICT_TRANS_TABLES
.sp
Enable strict mode for transactional storage engines, and when possible for non\-transactional storage engines. Additional details follow.
.sp
.RE
.PP
Strict mode controls how MySQL handles input values that are invalid or missing. A value can be invalid for several reasons. For example, it might have the wrong data type for the column, or it might be out of range. A value is missing when a new row to be inserted does not contain a value for a non\-NULL
column that has no explicit
DEFAULT
clause in its definition. (For a
NULL
column,
NULL
is inserted if the value is missing.)
.PP
For transactional tables, an error occurs for invalid or missing values in a statement when either of the
STRICT_ALL_TABLES
or
STRICT_TRANS_TABLES
modes are enabled. The statement is aborted and rolled back.
.PP
For non\-transactional tables, the behavior is the same for either mode, if the bad value occurs in the first row to be inserted or updated. The statement is aborted and the table remains unchanged. If the statement inserts or modifies multiple rows and the bad value occurs in the second or later row, the result depends on which strict option is enabled:
.TP 3n
\(bu
For
STRICT_ALL_TABLES, MySQL returns an error and ignores the rest of the rows. However, in this case, the earlier rows still have been inserted or updated. This means that you might get a partial update, which might not be what you want. To avoid this, it's best to use single\-row statements because these can be aborted without changing the table.
.TP 3n
\(bu
For
STRICT_TRANS_TABLES, MySQL converts an invalid value to the closest valid value for the column and insert the adjusted value. If a value is missing, MySQL inserts the implicit default value for the column data type. In either case, MySQL generates a warning rather than an error and continues processing the statement. Implicit defaults are described in
Section\ 1.4, \(lqData Type Default Values\(rq.
.sp
.RE
.PP
Strict mode disallows invalid date values such as
\'2004\-04\-31'. It does not disallow dates with zero parts such as
\'2004\-04\-00'
or
\(lqzero\(rq
dates. To disallow these as well, enable the
NO_ZERO_IN_DATE
and
NO_ZERO_DATE
SQL modes in addition to strict mode.
.PP
If you are not using strict mode (that is, neither
STRICT_TRANS_TABLES
nor
STRICT_ALL_TABLES
is enabled), MySQL inserts adjusted values for invalid or missing values and produces warnings. In strict mode, you can produce this behavior by using
INSERT IGNORE
or
UPDATE IGNORE. See
Section\ 5.4.32, \(lqSHOW WARNINGS Syntax\(rq.
.PP
The following special modes are provided as shorthand for combinations of mode values from the preceding list.
.PP
The descriptions include all mode values that are available in the most recent version of MySQL. For older versions, a combination mode does not include individual mode values that are not available except in newer versions.
.TP 3n
\(bu
ANSI
.sp
Equivalent to
REAL_AS_FLOAT,
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE.
.sp
As of MySQL 5.1.18,
ANSI
mode also causes the server to return an error for queries where a set function
\fIS\fR
with an outer reference
\fIS\fR(\fIouter_ref\fR)
cannot be aggregated in the outer query against which the outer reference has been resolved. This is such a query:
.sp
.RS 3n
.nf
SELECT * FROM t1 WHERE t1.a IN (SELECT MAX(t1.b) FROM t2 WHERE ...);
.fi
.RE
Here,
MAX(t1.b)
cannot aggregated in the outer query because it appears in the
WHERE
clause of that query. Standard SQL requires an error in this situation. If
ANSI
mode is not enabled, the server treats
\fIS\fR(\fIouter_ref\fR)
in such queries the same way that it would interpret
\fIS\fR(\fIconst\fR), as was always done prior to 5.1.18.
.sp
See
Section\ 9.3, \(lqRunning MySQL in ANSI Mode\(rq.
.TP 3n
\(bu
DB2
.sp
Equivalent to
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE,
NO_KEY_OPTIONS,
NO_TABLE_OPTIONS,
NO_FIELD_OPTIONS.
.TP 3n
\(bu
MAXDB
.sp
Equivalent to
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE,
NO_KEY_OPTIONS,
NO_TABLE_OPTIONS,
NO_FIELD_OPTIONS,
NO_AUTO_CREATE_USER.
.TP 3n
\(bu
MSSQL
.sp
Equivalent to
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE,
NO_KEY_OPTIONS,
NO_TABLE_OPTIONS,
NO_FIELD_OPTIONS.
.TP 3n
\(bu
MYSQL323
.sp
Equivalent to
NO_FIELD_OPTIONS,
HIGH_NOT_PRECEDENCE.
.TP 3n
\(bu
MYSQL40
.sp
Equivalent to
NO_FIELD_OPTIONS,
HIGH_NOT_PRECEDENCE.
.TP 3n
\(bu
ORACLE
.sp
Equivalent to
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE,
NO_KEY_OPTIONS,
NO_TABLE_OPTIONS,
NO_FIELD_OPTIONS,
NO_AUTO_CREATE_USER.
.TP 3n
\(bu
POSTGRESQL
.sp
Equivalent to
PIPES_AS_CONCAT,
ANSI_QUOTES,
IGNORE_SPACE,
NO_KEY_OPTIONS,
NO_TABLE_OPTIONS,
NO_FIELD_OPTIONS.
.TP 3n
\(bu
TRADITIONAL
.sp
Equivalent to
STRICT_TRANS_TABLES,
STRICT_ALL_TABLES,
NO_ZERO_IN_DATE,
NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,
NO_AUTO_CREATE_USER.
.SH "THE SHUTDOWN PROCESS"
.PP
The server shutdown process takes place as follows:
.TP 3n
1.
The shutdown process is initiated.
.sp
Server shutdown can be initiated several ways. For example, a user with the
SHUTDOWN
privilege can execute a
\fBmysqladmin shutdown\fR
command.
\fBmysqladmin\fR
can be used on any platform supported by MySQL. Other operating system\-specific shutdown initiation methods are possible as well: The server shuts down on Unix when it receives a
SIGTERM
signal. A server running as a service on Windows shuts down when the services manager tells it to.
.TP 3n
2.
The server creates a shutdown thread if necessary.
.sp
Depending on how shutdown was initiated, the server might create a thread to handle the shutdown process. If shutdown was requested by a client, a shutdown thread is created. If shutdown is the result of receiving a
SIGTERM
signal, the signal thread might handle shutdown itself, or it might create a separate thread to do so. If the server tries to create a shutdown thread and cannot (for example, if memory is exhausted), it issues a diagnostic message that appears in the error log:
.sp
.RS 3n
.nf
Error: Can't create thread to kill server
.fi
.RE
.TP 3n
3.
The server stops accepting new connections.
.sp
To prevent new activity from being initiated during shutdown, the server stops accepting new client connections. It does this by closing the network connections to which it normally listens for connections: the TCP/IP port, the Unix socket file, the Windows named pipe, and shared memory on Windows.
.TP 3n
4.
The server terminates current activity.
.sp
For each thread that is associated with a client connection, the connection to the client is broken and the thread is marked as killed. Threads die when they notice that they are so marked. Threads for idle connections die quickly. Threads that currently are processing statements check their state periodically and take longer to die. For additional information about thread termination, see
Section\ 5.5.3, \(lqKILL Syntax\(rq, in particular for the instructions about killed
REPAIR TABLE
or
OPTIMIZE TABLE
operations on
MyISAM
tables.
.sp
For threads that have an open transaction, the transaction is rolled back. Note that if a thread is updating a non\-transactional table, an operation such as a multiple\-row
UPDATE
or
INSERT
may leave the table partially updated, because the operation can terminate before completion.
.sp
If the server is a master replication server, threads associated with currently connected slaves are treated like other client threads. That is, each one is marked as killed and exits when it next checks its state.
.sp
If the server is a slave replication server, the I/O and SQL threads, if active, are stopped before client threads are marked as killed. The SQL thread is allowed to finish its current statement (to avoid causing replication problems), and then stops. If the SQL thread was in the middle of a transaction at this point, the transaction is rolled back.
.TP 3n
5.
Storage engines are shut down or closed.
.sp
At this stage, the table cache is flushed and all open tables are closed.
.sp
Each storage engine performs any actions necessary for tables that it manages. For example,
MyISAM
flushes any pending index writes for a table.
InnoDB
flushes its buffer pool to disk, unless
innodb_fast_shutdown
is 2, writes the current LSN to the tablespace, and terminates its own internal threads.
.TP 3n
6.
The server exits.
.SH "SERVER\-SIDE HELP"
.PP
MySQL Server supports a
HELP
statement that returns online information from the MySQL Reference manual (see
Section\ 3.2, \(lqHELP Syntax\(rq). The proper operation of this statement requires that the help tables in the
mysql
database be initialized with help topic information, which is done by processing the contents of the
\fIfill_help_tables.sql\fR
script.
.PP
For a MySQL binary distribution on Unix, help table setup occurs when you run
\fBmysql_install_db\fR. For an RPM distribution on Linux or binary distribution on Windows, help table setup occurs as part of the MySQL installation process.
.PP
For a MySQL source distribution, you can find the
\fIfill_help_tables.sql\fR
file in the
\fIscripts\fR
directory. To load the file manually, make sure that you have initialized the
mysql
database by running
\fBmysql_install_db\fR, and then process the file with the
\fBmysql\fR
client as follows:
.sp
.RS 3n
.nf
shell> \fBmysql \-u root mysql < fill_help_tables.sql\fR
.fi
.RE
.PP
If you are working with BitKeeper and a MySQL development source tree, the tree doesn't contain
\fIfill_help_tables.sql\fR. You can download the proper file for your version of MySQL from
\fI\%http://dev.mysql.com/doc/\fR. After downloading and uncompressing the file, process it with
\fBmysql\fR
as just described.
.SH "COPYRIGHT"
.PP
Copyright 2007 MySQL AB
.PP
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA or see http://www.gnu.org/licenses/.
.PP
Please email
for more information or if you are interested in doing a translation.
.SH "REFERENCES"
.TP 3
1.\ MySQL Internals: Porting
\%http://forge.mysql.com/wiki/MySQL_Internals_Porting
.TP 3
2.\ Bug#28607
\%http://bugs.mysql.com/28607
.TP 3
3.\ Auto\-Increment in Multiple\-Master Replication
\%http://dev.mysql.com/doc/refman/5.1/en/replication\-auto\-increment.html
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
MySQL AB (http://www.mysql.com/).