The world's most popular open source database
When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.3, “Specifying Program Options”. 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 4.2.3.2, “Using Option Files”.
MySQL Enterprise. For expert advice on setting command options, subscribe to the MySQL Enterprise Monitor. For more information, see http://www.mysql.com/products/enterprise/advisors.html.
mysqld reads options from the
[mysqld] and [server]
groups. mysqld_safe reads options from the
[mysqld], [server],
[mysqld_safe], and
[safe_mysqld] groups.
mysql.server reads options from the
[mysqld] and
[mysql.server] groups.
An embedded MySQL server usually reads options from the
[server], [embedded], and
[
groups, where xxxxx_SERVER]xxxxx is the name of
the application into which the server is embedded.
mysqld accepts many command options. For a brief summary, execute mysqld --help. To see the full list, use mysqld --verbose --help.
The following list shows some of the most common server options. Additional options are described in other sections:
Options that affect security: See Section 5.3.3, “Security-Related mysqld Options”.
SSL-related options: See Section 5.5.7.3, “SSL Command Options”.
Binary log control options: See Section 5.2.4, “The Binary Log”.
Replication-related options: See Section 15.1.4, “Replication Options and Variables”.
Options specific to particular storage engines: See
Section 13.4.1, “MyISAM Startup Options”, and
Section 13.6.4, “InnoDB Startup Options and System Variables”.
You can also set the values of server system variables by using variable names as options, as described at the end of this section.
Display a short help message and exit. Use both the
--verbose and --help
options to see the full message.
| Value Set |
|
When this option is set to some positive integer
value other than 0 (the default)
it affects replication behavior as follows: After the slave
SQL thread has started, value log
events are allowed to be executed; after that, the slave SQL
thread does not receive any more events, just as if the
network connection from the master were cut. The slave
thread continues to run, and the output from
SHOW SLAVE STATUS displays
Yes in both the
Slave_IO_Running and the
Slave_SQL_Running columns, but no further
events are read from the relay log.
This option is used internally by the MySQL test suite for replication testing and debugging. It is not intended for use in a production setting.
| Value Set |
|
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 20.3.2.6, “User-Defined Function Security Precautions”.
Use standard (ANSI) SQL syntax instead of MySQL syntax. For
more precise control over the server SQL mode, use the
--sql-mode option instead. See
Section 1.7.3, “Running MySQL in ANSI Mode”, and
Section 5.1.7, “Server SQL Modes”.
| Version Introduced | 6.0.7 | ||
| Option Sets Variable | Yes, backupdir
|
||
| Variable Name | backupdir |
||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
The path to the default iimage file directory for
BACKUP DATABASE and
RESTORE operations. If an
image file is named as a relative pathname, it is
interpreted relative to the value of
backupdir. If the value of
backupdir is itself a relative pathname,
its value is interpreted relative to the data directory. The
default value is the data directory. This variable was added
in MySQL 6.0.7.
| Option Sets Variable | Yes, basedir
|
||
| Variable Name | basedir |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
The path to the MySQL installation directory. All paths are usually resolved relative to this directory.
| Option Sets Variable | Yes, big_tables
|
||
| Variable Name | big-tables |
||
| Variable Scope | Session | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
Allow large result sets by saving all temporary sets in files. This option prevents most “table full” 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.
| Value Set |
|
The IP address to bind to. Only one address can be selected. If this option is specified multiple times, the last address given is used.
--binlog-format={ROW|STATEMENT|MIXED}
| Option Sets Variable | Yes, binlog_format
|
||||||
| Variable Name | binlog_format |
||||||
| Variable Scope | Both | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
Specify whether to use row-based, statement-based, or mixed replication (mixed is the default in MySQL 6.0). See Section 15.1.2, “Replication Formats”.
| Value Set |
|
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 15.1.2, “Replication Formats”.
This option is used by the mysql_install_db script to create the MySQL privilege tables without having to start a full MySQL server.
This option is unavailable if MySQL was configured with the
--disable-grant-options option. See
Section 2.9.2, “Typical configure Options”.
| Option Sets Variable | Yes, character_sets_dir
|
||
| Variable Name | character-sets-dir |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
The directory where character sets are installed. See Section 9.2, “The Character Set Used for Data and Sorting”.
--character-set-client-handshake
| Value Set |
|
Don't ignore character set information sent by the client.
To ignore client information and use the default server
character set, use
--skip-character-set-client-handshake; this
makes MySQL behave like MySQL 4.0.
--character-set-filesystem=
charset_name
| Option Sets Variable | Yes, character_set_filesystem
|
||
| Variable Name | character_set_filesystem |
||
| Variable Scope | Both | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
The filesystem character set. This option sets the
character_set_filesystem system variable.
--character-set-server=,
charset_name-C
charset_name
| Option Sets Variable | Yes, character_set_server
|
||
| Variable Name | character_set_server |
||
| Variable Scope | Both | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
Use charset_name as the default
server character set. See
Section 9.2, “The Character Set Used for Data and Sorting”. If you use this
option to specify a non-default character set, you should
also use --collation-server to specify the
collation.
| Value Set |
|
Put the mysqld 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.
--collation-server=
collation_name
| Option Sets Variable | Yes, collation_server
|
||
| Variable Name | collation_server |
||
| Variable Scope | Both | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
Use collation_name as the default
server collation. See
Section 9.2, “The Character Set Used for Data and Sorting”.
| Option Sets Variable | Yes, console
|
| Platform Specific | windows |
(Windows only.) Write error log messages to
stderr and stdout even
if --log-error is specified.
mysqld does not close the console window
if this option is used.
| Value Set |
|
Write a core file if mysqld dies. For
some systems, you must also specify the
--core-file-size option to
mysqld_safe. See
Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. Note that on some systems,
such as Solaris, you do not get a core file if you are also
using the --user option.
| Option Sets Variable | Yes, datadir
|
||
| Variable Name | datadir |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
The path to the data directory.
--debug[=,
debug_options]-#
[
debug_options]
| Variable Name | debug |
||||
| Variable Scope | Both | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
If MySQL is configured with --with-debug,
you can use this option to get a trace file of what
mysqld is doing. The
debug_options string often is
'd:t:o,.
The default is file_name''d:t:i:o,mysqld.trace'.
See
MySQL
Internals: Porting.
Using --with-debug to configure MySQL with
debugging support enables you to use the
--debug="d,parser_debug" 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.
This option may be given multiple times. Values that begin
with + or - are added
to or subtracted from the previous value. For example,
--debug=T --debug=+P sets
the value to P:T.
| Version Introduced | 6.0.6 | ||
| Value Set |
|
Controls whether the Debug Sync facility for testing and
debugging is enabled. Use of Debug Sync requires that MySQL
be configured with the ---enable-debug-sync
option (see Section 2.9.2, “Typical configure Options”). If Debug
Sync is not compiled in, this option is not available. The
option value is a timeout in seconds. The default value is
0, which disables Debug Sync. To enable it, specify a value
greater than 0; this value also becomes the default timeout
for individual synchronization points. If the option is
given without a value, the timeout is set to 300 seconds.
For a description of the Debug Sync facility and how to use synchronization points, see MySQL Internals: Test Synchronization.
This option was added in MySQL 6.0.6.
--default-character-set=
(DEPRECATED)
charset_name
| Deprecated | 5.0 | ||
| Value Set |
|
Use charset_name as the default
character set. This option is deprecated in favor of
--character-set-server. See
Section 9.2, “The Character Set Used for Data and Sorting”.
--default-collation=
collation_name
| Variable Name | default-collation |
||
| Variable Scope | |||
| Dynamic Variable | No | ||
| Deprecated | 4.1.3 | ||
| Value Set |
|
Use collation_name as the default
collation. This option is deprecated in favor of
--collation-server. See
Section 9.2, “The Character Set Used for Data and Sorting”.
Set the default storage engine (table type) for tables. See Chapter 13, Storage Engines.
| Deprecated | 5.0, by default-storage-engine
|
||
| Value Set |
|
This option is a deprecated synonym for
--default-storage-engine. It has been
removed as of MySQL 6.0.8.
| Value Set |
|
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.
--delay-key-write[={OFF|ON|ALL}]
| Option Sets Variable | Yes, delay_key_write
|
||||||
| Variable Name | delay-key-write |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
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 7.5.2, “Tuning Server Parameters”, and
Section 13.4.1, “MyISAM Startup Options”.
If you set this variable to ALL, you
should not use MyISAM tables from
within another program (such as another MySQL server or
myisamchk) when the tables are in use.
Doing so leads to index corruption.
Read the default DES keys from this file. These keys are
used by the DES_ENCRYPT() and
DES_DECRYPT() functions.
--disconnect-slave-event-count
| Value Set |
|
This option is used internally by the MySQL test suite for replication testing and debugging.
Enable support for named pipes. This option applies only on Windows NT, 2000, XP, and 2003 systems.
| Value Set |
|
Print a symbolic stack trace on failure.
--engine-condition-pushdown={ON|OFF}
| Option Sets Variable | Yes, engine_condition_pushdown
|
||||
| Variable Name | engine_condition_pushdown |
||||
| Variable Scope | Both | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
When the value of this option is 0 (OFF),
a query such as SELECT * FROM t WHERE mycol =
42, where mycol is a
non-indexed column, is executed as a full table scan. The
storage engine sends every row to the MySQL server, which
applies the WHERE condition. If
engine_condition_pushdown is set to 1
(ON), the condition is “pushed
down” to the storage engine, which uses the condition
to perform the scan, and sends back to the MySQL server only
those rows that match the condition. By default, this
variable is OFF.
In MySQL 6.0, this option can be used used only
with the MyISAM storage engine. It may be
implemented for additional storage engines in future MySQL
releases.
For more information, see Section 7.2.7, “Condition Pushdown Optimization”.
| Option Sets Variable | Yes, event-scheduler
|
||||||
| Variable Name | event_scheduler |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
Enable or disable, and start or stop, the event scheduler.
For detailed information, see
The
event-scheduler Option.
--exit-info[=,
flags]-T [
flags]
| Value Set |
|
This is a bit mask of different flags that you can use for debugging the mysqld server. Do not use this option unless you know exactly what it does!
| Option Sets Variable | Yes, external_locking
|
||||
| Disabled by | skip-external-locking |
||||
| Value Set |
|
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
mysqld to deadlock. This option
previously was named --enable-locking.
For more information about external locking, including conditions under which it can and cannot be used, see Section 7.3.4, “External Locking”.
| Variable Name | flush |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
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 B.1.4.2, “What to Do If MySQL Keeps Crashing”.
| Value Set |
|
Install an interrupt handler for SIGINT
(needed to stop mysqld with
^C to set breakpoints) and disable stack
tracing and core file handling. See
MySQL
Internals: Porting.
| Option Sets Variable | Yes, general_log
|
||||
| Variable Name | general_log |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
Specify the initial general query log state. With no
argument or an argument of 1, the
--general-log option disables the log. If
omitted or given with an argument of 0, the option disables
the log.
| Option Sets Variable | Yes, init_file
|
||
| Variable Name | init_file |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
Read SQL statements from this file at startup. Each statement must be on a single line and should not include comments.
This option is unavailable if MySQL was configured with the
--disable-grant-options option. See
Section 2.9.2, “Typical configure Options”.
--innodb-
xxx
The InnoDB options are listed in
Section 13.6.4, “InnoDB Startup Options and System Variables”.
--language=
lang_name, -L
lang_name
| Option Sets Variable | Yes, language
|
||||
| Variable Name | language |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | No | ||||
| Value Set |
|
Return client error messages in the given language.
lang_name can be given as the
language name or as the full pathname to the directory where
the language files are installed. See
Section 9.3, “Setting the Error Message Language”.
| Option Sets Variable | Yes, large_pages
|
||||||
| Variable Name | large_pages |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | No | ||||||
| Platform Specific | linux | ||||||
| Value Set |
|
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.
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.
Before large pages can be used on Linux, it is necessary to
configure the HugeTLB memory pool. For reference, consult
the hugetlbpage.txt file in the Linux
kernel source.
This option is disabled by default.
--log[=,
file_name]-l [
file_name]
| Option Sets Variable | Yes, log
|
||||
| Variable Name | log |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | Yes | ||||
| Deprecated | 5.1.29, by general-log
|
||||
| Value Set |
|
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 --log-output
option. See Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”, and
Section 5.2.3, “The General Query Log”.
As of MySQL 6.0.8, the --log option is
deprecated and will be removed (along with the
log system variable) in MySQL 7.0.
Instead, use the --general_log option to
enable the general query log and the
--general_log_file=
option to set the general query log filename.
file_name
--log-backup-output[=
value,...]
| Version Introduced | 6.0.8 | ||||||
| Option Sets Variable | Yes, log_backup_output
|
||||||
| Variable Name | log_backup_output |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
This option determines the destination for MySQL Backup
history and progress 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. TABLE selects
logging to the backup_history and
backup_progress log tables in the
mysql database as a destination.
FILE selects logging to log files as a
destination. 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.
This option selects log output destinations, but does not
enable log output. To do that, use the
--backup_history_log and
--backup_progress_log options. For
FILE logging, the default log files are
backup_history.log and
backup_progress.log in the data
directory. To change the names, set the global
backup_history_log_file and
backup_progress_log_file system
variables. For more information, see
Section 6.3.3.1, “MySQL Backup Log Control”.
This option was added in MySQL 6.0.8.
| Variable Name | log_bin |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | No | ||||
| Value Set |
|
Enable binary logging. The server logs all statements that change data to the binary log, which is used for backup and replication. See Section 5.2.4, “The Binary Log”.
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 B.1.8.1, “Open Issues in MySQL”, for the reason). Otherwise,
MySQL uses
as the basename.
host_name-bin
| Value Set |
|
The index file for binary log filenames. See
Section 5.2.4, “The Binary Log”. If you omit the filename, and
if you didn't specify one with --log-bin,
MySQL uses
as the filename.
host_name-bin.index
--log-bin-trust-function-creators[={0|1}]
| Option Sets Variable | Yes, log_bin_trust_function_creators
|
||||
| Variable Name | log_bin_trust_function_creators |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
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 and
trigger creation. See
Section 17.6, “Binary Logging of Stored Programs”.
| Option Sets Variable | Yes, log_error
|
||
| Variable Name | log_error |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
Log errors and startup messages to this file. See
Section 5.2.2, “The Error Log”. If you omit the filename, MySQL
uses
.
If the filename has no extension, the server adds an
extension of host_name.err.err.
| Value Set |
|
Log all MyISAM changes to this file (used
only when debugging MyISAM).
--log-long-format
(DEPRECATED)
| Deprecated | 4.1 |
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
--log-short-format.) The
--log-queries-not-using-indexes option is
available for the purpose of logging queries that do not use
indexes to the slow query log.
| Option Sets Variable | Yes, log_output
|
||||||
| Variable Name | log_output |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
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
FILE. TABLE selects
logging to the general_log and
slow_log tables in the
mysql database as a destination.
FILE selects logging to log files as a
destination. 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.
This option selects log output destinations, but does not
enable log output. To do that, use the
--general_log and
--slow_query_log options. For
FILE logging, the
--general_log_file and
-slow_query_log_file options determine the
log file location. (Before MySQL 6.0.8, enable the logs with
the --log and
--log-slow-queries options. The options
take an optional filename argument to specify the log
filename.) For more information, see
Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”.
--log-queries-not-using-indexes
| Option Sets Variable | Yes, log_queries_not_using_indexes
|
||
| Variable Name | log_queries_not_using_indexes |
||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Deprecated | 5.1.29, by slow-query-log
|
||
| Value Set |
|
If you are using this option with the slow query log enabled, queries that are expected to retrieve all rows are logged. See Section 5.2.5, “The Slow Query Log”. This option does not necessarily mean that no index is used. For example, a query that uses a full index scan uses an index but would be logged because the index would not limit the number of rows.
| Value Set |
|
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.
| Value Set |
|
Log slow administrative statements such as
OPTIMIZE TABLE,
ANALYZE TABLE, and
ALTER TABLE to the slow query
log.
--log-slow-queries[=
file_name]
| Option Sets Variable | Yes, log_slow_queries
|
||
| Variable Name | log_slow_queries |
||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Value Set |
|
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 --log-long-format
and --log-short-format options for details.
The log output destination can be selected with the
--log-output option. If you omit the
filename, MySQL uses
as the filename. See Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”, and
Section 5.2.5, “The Slow Query Log”.
host_name-slow.log
As of MySQL 6.0.8, the --log-slow-queries
option is deprecated and will be removed (along with the
log_slow_queries system variable) in
MySQL 7.0. Instead, use the
--slow_query_log option to enable the slow
query log and the
--slow_query_log_file=
option to set the slow query log filename.
file_name
| Version Introduced | 6.0.4 | ||||
| Value Set |
|
When the slow query log is enabled, this option enables
logging for queries that have taken more than
long_query_time seconds to execute on the
slave.
This option was added in MySQL 6.0.4.
| Value Set |
|
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 tc.log. The file is created under
the data directory if not given as a full pathname.
Currently, this option is unused.
| Value Set |
|
The size in bytes of the memory-mapped transaction coordinator log. The default size is 24KB.
--log-warnings[=,
level]-W [
level]
| Option Sets Variable | Yes, log-warnings
|
||||
| Variable Name | log_warnings |
||||
| Variable Scope | Both | ||||
| Dynamic Variable | Yes | ||||
| Disabled by | skip-log-warnings |
||||
| Value Set |
|
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
level value if omitted is 1. To
disable this option, use --log-warnings=0.
If the value is greater than 1, aborted connections are
written to the error log, and access-denied errors for new
connection attempts are written. See
Section B.1.2.11, “Communication Errors and Aborted Connections”.
If a slave server was started with
--log-warnings enabled, the slave prints
messages to the error log to provide information about its
status, such as the binary log and relay log coordinates
where it starts its job, when it is switching to another
relay log, when it reconnects after a disconnect, and so
forth.
| Option Sets Variable | Yes, low_priority_updates
|
||||
| Variable Name | low_priority_updates |
||||
| Variable Scope | Both | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
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 7.3.2, “Table Locking Issues”.
--min-examined-row-limit=
number
| Version Introduced | 6.0.4 | ||||||
| Variable Name | min_examined_row_limit |
||||||
| Variable Scope | Both | ||||||
| Dynamic Variable | Yes | ||||||
| Value Set |
|
When this option is set, queries which examine fewer than
number rows are not written to
the slow query log. The default is 0.
This option was introduced in MySQL 6.0.4.
| Value Set |
|
This option is used internally by the MySQL test suite for replication testing and debugging.
| Variable Name | locked_in_memory |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | No | ||||
| Value Set |
|
Lock the mysqld process in memory. This option might help if you have a problem where the operating system is causing mysqld to swap to disk.
--memlock works on systems that support the
mlockall() system call; this includes
Solaris as well as most Linux distributions that use a 2.4
or newer kernel. On Linux systems, you can tell whether or
not mlockall() (and thus this option) is
supported by checking to see whether or not it is defined in
the system mman.h file, like this:
shell> grep mlockall /usr/include/sys/mman.h
If mlockall() is supported, you should
see in the output of the previous command something like the
following:
extern int mlockall (int __flags) __THROW;
Using this option requires that you run the server as
root, which, for reasons of security,
is normally not a good idea. See
Section 5.3.5, “How to Run MySQL as a Normal User”.
You must not try to use this option on a system that does
not support the mlockall() system call;
if you do so, mysqld will very likely
crash as soon as you try to start it.
| Value Set |
|
The block size to be used for MyISAM
index pages.
--myisam-recover[=
option[,option]...]]
| Value Set |
|
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.
Specifying the option with no argument is the same as
specifying DEFAULT, and specifying with
an explicit value of "" disables recovery
(same as not giving the option). If recovery is enabled,
each time mysqld 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, mysqld
runs a check on the table. If the table was corrupted,
mysqld attempts to repair it.
The following options affect how the repair works:
| Option | Description |
DEFAULT |
Recovery without backup, forcing, or quick checking. |
BACKUP |
If the data file was changed during recovery, save a backup of the
file as
. |
FORCE |
Run recovery even if we would lose more than one row from the
.MYD file. |
QUICK |
Don't check the rows in the table if there aren't any delete blocks. |
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.
| Option Sets Variable | Yes, old_passwords
|
||||
| Variable Name | old_passwords |
||||
| Variable Scope | Both | ||||
| Dynamic Variable | Yes | ||||
| Value Set |
|
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.4.8, “Password Hashing as of MySQL 4.1”.
| Value Set |
|
Enable old-style user limits. (Before MySQL 5.0.3, account
resource limits were counted separately for each host from
which a user connected rather than per account row in the
user table.) See
Section 5.5.4, “Limiting Account Resources”.
Only use one thread (for debugging under Linux). This option is available only if the server is built with debugging enabled. See MySQL Internals: Porting.
This option is deprecated; use
--thread_handling=one-thread instead.
| Option Sets Variable | Yes, open_files_limit
|
||||||
| Variable Name | open_files_limit |
||||||
| Variable Scope | Global | ||||||
| Dynamic Variable | No | ||||||
| Value Set |
|
Changes the number of file descriptors available to
mysqld. You should try increasing the
value of this option if mysqld gives you
the error Too many open files.
mysqld uses the option value to reserve
descriptors with setrlimit(). If the
requested number of file descriptors cannot be allocated,
mysqld writes a warning to the error log.
mysqld may attempt to allocate more than
the requested number of descriptors (if they are available),
using the values of max_connections and
table_open_cache to estimate whether more
descriptors will be needed.
| Option Sets Variable | Yes, pid_file
|
||
| Variable Name | pid_file |
||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Value Set |
|
The pathname of the process ID file. This file is used by other programs such as mysqld_safe to determine the server's process ID.
| Value Set |
|
Under normal startup, the server determines which plugins to
load by reading the mysql.plugins system
table. This option enables plugins to be loaded even when
--skip-grant-tables is given (which tells
the server not to read system tables). This option also
enables plugins to be loaded at startup under configurations
when plugins cannot be loaded at runtime.
The option value is a colon-separated list of
values. Each name=plugin_libraryname is the name of
the plugin, and plugin_library is
the name of the shared library that contains the plugin
code. Each library file must be located in the directory
named by the plugin_dir system variable.
For example, if plugins named myplug1 and
myplug2 have library files
myplug1.so and
myplug2.so, use this option to load
them at startup:
shell> mysqld --plugin-load=myplug1=myplug1.so:myplug2=myplug2.so
All plugins to load must be named in the same
--plugin-load option. If multiple
--plugin-load options are given, only the
last one is used.
The plugins are loaded for a single invocation of
mysqld only. After a restart, the plugins
are not loaded unless --plugin-load is used
again. This is in contrast to INSTALL
PLUGIN, which adds an entry to the
mysql.plugins table to cause the plugin
to be loaded for every normal server startup.
| Option Sets Variable | Yes, port
|
||||
| Variable Name | port |
||||
| Variable Scope | Global | ||||
| Dynamic Variable | No | ||||
| Value Set |
|
The port number to use when listening for TCP/IP connections

