Rechercher dans le manuel MySQL
5.1.7 Server Command Options
When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.4, “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.7, “Using Option Files”. That section also describes option file format and syntax.
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.
mysqld accepts many command options. For a brief summary, execute this command:
mysqld --help
To see the full list, use this command:
mysqld --verbose --help
Some of the items in the list are actually system variables that
can be set at server startup. These can be displayed at runtime
using the SHOW VARIABLES
statement.
Some items displayed by the preceding mysqld
command do not appear in SHOW
VARIABLES
output; this is because they are options only
and not system variables.
The following list shows some of the most common server options. Additional options are described in other sections:
Options that affect security: See Section 6.1.4, “Security-Related mysqld Options and Variables”.
SSL-related options: See Section 6.4.2, “Command Options for Encrypted Connections”.
Binary log control options: See Section 5.4.4, “The Binary Log”.
Replication-related options: See Section 17.1.6, “Replication and Binary Logging Options and Variables”.
Options for loading plugins such as pluggable storage engines: See Section 5.6.1, “Installing and Uninstalling Plugins”.
Options specific to particular storage engines: See Section 15.13, “InnoDB Startup Options and System Variables” and Section 16.2.1, “MyISAM Startup Options”.
Some options control the size of buffers or caches. For a given buffer, the server might need to allocate internal data structures. These structures typically are allocated from the total memory allocated to the buffer, and the amount of space required might be platform dependent. This means that when you assign a value to an option that controls a buffer size, the amount of space actually available might differ from the value assigned. In some cases, the amount might be less than the value assigned. It is also possible that the server will adjust a value upward. For example, if you assign a value of 0 to an option for which the minimal value is 1024, the server will set the value to 1024.
Values for buffer sizes, lengths, and stack sizes are given in bytes unless otherwise specified.
Some options take file name values. Unless otherwise specified,
the default file location is the data directory if the value is a
relative path name. To specify the location explicitly, use an
absolute path name. Suppose that the data directory is
/var/mysql/data
. If a file-valued option is
given as a relative path name, it will be located under
/var/mysql/data
. If the value is an absolute
path name, its location is as given by the path name.
You can also set the values of server system variables at server
startup by using variable names as options. To assign a value to a
server system variable, use an option of the form
--
.
For example,
var_name
=value
--sort_buffer_size=384M
sets the
sort_buffer_size
variable to a
value of 384MB.
When you assign a value to a variable, MySQL might automatically correct the value to stay within a given range, or adjust the value to the closest permissible value if only certain values are permitted.
To restrict the maximum value to which a system variable can be
set at runtime with the
SET
statement, specify this maximum by using an option of the form
--maximum-
at server startup.
var_name
=value
You can change the values of most system variables at runtime with
the SET
statement. See Section 13.7.5.1, “SET Syntax for Variable Assignment”.
Section 5.1.8, “Server System Variables”, provides a full description for all variables, and additional information for setting them at server startup and runtime. For information on changing system variables, see Section 5.1.1, “Configuring the Server”.
--help
,-?
Property Value Command-Line Format --help
Display a short help message and exit. Use both the
--verbose
and--help
options to see the full message.-
Property Value Command-Line Format --allow-suspicious-udfs
Type Boolean Default Value FALSE
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 29.4.2.6, “UDF Security Precautions”. -
Property Value Command-Line Format --ansi
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.8, “MySQL Standards Compliance”, and Section 5.1.11, “Server SQL Modes”. --basedir=
,dir_name
-b
dir_name
Property Value Command-Line Format --basedir=dir_name
System Variable basedir
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name Default Value (>= 8.0.2) parent of mysqld installation directory
Default Value (<= 8.0.1) configuration-dependent default
The path to the MySQL installation directory. This option sets the
basedir
system variable.The server executable determines its own full path name at startup and uses the parent of the directory in which it is located as the default
basedir
value. This in turn enables the server to use thatbasedir
when searching for server-related information such as theshare
directory containing error messages.-
Property Value Command-Line Format --big-tables
System Variable big_tables
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
Enable 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. The server is able to handle large result sets automatically by using memory for small temporary tables and switching to disk tables where necessary.
-
Property Value Command-Line Format --bind-address=addr
System Variable bind_address
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type String Default Value *
The MySQL server listens on one or more network sockets for TCP/IP connections. Each socket is bound to one address, but it is possible for an address to map onto multiple network interfaces. To specify how the server should listen for TCP/IP connections, use the
--bind-address
option at server startup:Prior to MySQL 8.0.13,
--bind-address
accepts a single address value, which may specify a single non-wildcard IP address or host name, or one of the wildcard address formats that permit listening on multiple network interfaces (*
,0.0.0.0
, or::
).As of MySQL 8.0.13,
--bind-address
accepts a single value as just described, or a list of comma-separated values. When the option names a list of multiple values, each value must specify a single non-wildcard IP address or host name; none can specify a wildcard address format (*
,0.0.0.0
, or::
).
IP addresses can be specified as IPv4 or IPv6 addresses. For any option value that is a host name, the server resolves the name to an IP address and binds to that address. If a host name resolves to multiple IP addresses, the server uses the first IPv4 address if there are any, or the first IPv6 address otherwise.
The server treats different types of addresses as follows:
If the address is
*
, the server accepts TCP/IP connections on all server host IPv4 interfaces, and, if the server host supports IPv6, on all IPv6 interfaces. Use this address to permit both IPv4 and IPv6 connections on all server interfaces. This value is the default. If the option specifies a list of multiple values, this value is not permitted.If the address is
0.0.0.0
, the server accepts TCP/IP connections on all server host IPv4 interfaces. If the option specifies a list of multiple values, this value is not permitted.If the address is
::
, the server accepts TCP/IP connections on all server host IPv4 and IPv6 interfaces. If the option specifies a list of multiple values, this value is not permitted.If the address is an IPv4-mapped address, the server accepts TCP/IP connections for that address, in either IPv4 or IPv6 format. For example, if the server is bound to
::ffff:127.0.0.1
, clients can connect using--host=127.0.0.1
or--host=::ffff:127.0.0.1
.If the address is a “regular” IPv4 or IPv6 address (such as
127.0.0.1
or::1
), the server accepts TCP/IP connections only for that IPv4 or IPv6 address.
If binding to any address fails, the server produces an error and does not start.
Examples:
--bind-address=*
The server listens on all IPv4 or IPv6 addresses, as specified by the
*
wildcard.--bind-address=198.51.100.20
The server listens only on the
198.51.100.20
IPv4 address.--bind-address=198.51.100.20,2001:db8:0:f101::1
The server listens on the
198.51.100.20
IPv4 address and the2001:db8:0:f101::1
IPv6 address.--bind-address=198.51.100.20,*
This produces an error because wildcard addresses are not permitted when
--bind-address
names a list of multiple values.
When
--bind-address
names a single value (wildcard or non-wildcard), the server listens on a single socket, which for a wildcard address may be bound to multiple network interfaces. When--bind-address
names a list of multiple values, the server listens on one socket per value, with each socket bound to a single network interface. The number of sockets is linear with the number of values specified. Depending on operating system connection-acceptance efficiency, long value lists might incur a performance penalty for accepting TCP/IP connections.If you intend to bind the server to a specific address, be sure that the
mysql.user
system table contains an account with administrative privileges that you can use to connect to that address. Otherwise, you will not be able to shut down the server. For example, if you bind the server to*
, you can connect to it using all existing accounts. But if you bind the server to::1
, it accepts connections only on that address. In that case, first make sure that the'root'@'::1'
account is present in themysql.user
table so you can still connect to the server to shut it down.The server also permits administrative connections on a dedicated interface. See Section 8.12.4.1, “How MySQL Handles Client Connections”.
--binlog-format={ROW|STATEMENT|MIXED}
Property Value Command-Line Format --binlog-format=format
System Variable binlog_format
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Enumeration Default Value ROW
Valid Values ROW
STATEMENT
MIXED
Specify whether to use row-based, statement-based, or mixed replication. Statement-based is the default in MySQL 8.0. See Section 17.2.1, “Replication Formats”.
Under some conditions, changing this variable at runtime is not possible, or causes replication to fail. See Section 5.4.4.2, “Setting The Binary Log Format”, for more information.
Setting the binary logging format without enabling binary logging sets the
binlog_format
global system variable and logs a warning.-
Property Value Command-Line Format --character-sets-dir=dir_name
System Variable character_sets_dir
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name The directory where character sets are installed. See Section 10.14, “Character Set Configuration”.
--character-set-client-handshake
Property Value Command-Line Format --character-set-client-handshake
Type Boolean Default Value TRUE
Do not 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
Property Value Command-Line Format --character-set-filesystem=name
System Variable character_set_filesystem
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type String Default Value binary
The file system character set. This option sets the
character_set_filesystem
system variable.--character-set-server=
,charset_name
-C
charset_name
Property Value Command-Line Format --character-set-server
System Variable character_set_server
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type String Default Value (>= 8.0.1) utf8mb4
Default Value (8.0.0) latin1
Use
charset_name
as the default server character set. See Section 10.14, “Character Set Configuration”. If you use this option to specify a nondefault character set, you should also use--collation-server
to specify the collation.--chroot=
,dir_name
-r
dir_name
Property Value Command-Line Format --chroot=dir_name
Type Directory name Put the mysqld server in a closed environment during startup by using the
chroot()
system call. This is a recommended security measure. Use of this option somewhat limitsLOAD DATA INFILE
andSELECT ... INTO OUTFILE
.--collation-server=
collation_name
Property Value Command-Line Format --collation-server
System Variable collation_server
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type String Default Value (>= 8.0.1) utf8mb4_0900_ai_ci
Default Value (8.0.0) latin1_swedish_ci
Use
collation_name
as the default server collation. See Section 10.14, “Character Set Configuration”.-
Property Value Command-Line Format --console
Platform Specific Windows (Windows only.) Cause the default error log destination to be the console. This affects log writers that base their own output destination on the default destination. See Section 5.4.2, “The Error Log”. mysqld does not close the console window if this option is used.
--console
takes precedence over--log-error
if both are given. -
Property Value Command-Line Format --core-file
Type Boolean Default Value OFF
Write a core file if mysqld dies. The name and location of the core file is system dependent. On Linux, a core file named
core.
is written to the current working directory of the process, which for mysqld is the data directory.pid
pid
represents the process ID of the server process. On macOS, a core file namedcore.
is written to thepid
/cores
directory. On Solaris, use the coreadm command to specify where to write the core file and how to name it.For some systems, to get a core file you must also specify the
--core-file-size
option to mysqld_safe. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. On some systems, such as Solaris, you do not get a core file if you are also using the--user
option. There might be additional restrictions or limitations. For example, it might be necessary to execute ulimit -c unlimited before starting the server. Consult your system documentation.To reduce the size of core files, the
innodb_buffer_pool_in_core_file
option can be disabled to preventInnoDB
buffer pool pages from being written to core files. --daemonize
,-D
Property Value Command-Line Format --daemonize[={OFF|ON}]
Type Boolean Default Value OFF
This option causes the server to run as a traditional, forking daemon, permitting it to work with operating systems that use systemd for process control. For more information, see Section 2.5.9, “Managing MySQL Server with systemd”.
--daemonize
is mutually exclusive with--initialize
and--initialize-insecure
.If the server is started using the
--daemonize
option and is not connected to a tty device, a default error logging option of--log-error=""
is used in the absence of an explicit logging option, to direct error output to the default log file.-D
is a synonym for--daemonize
.--datadir=
,dir_name
-h
dir_name
Property Value Command-Line Format --datadir=dir_name
System Variable datadir
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name The path to the MySQL server data directory. This option sets the
datadir
system variable. See the description of that variable.--debug[=
,debug_options
]-# [
debug_options
]Property Value Command-Line Format --debug[=debug_options]
System Variable debug
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type String Default Value (Windows) d:t:i:O,\mysqld.trace
Default Value (Unix) d:t:i:o,/tmp/mysqld.trace
If MySQL is configured with the
-DWITH_DEBUG=1
CMake option, you can use this option to get a trace file of what mysqld is doing. A typicaldebug_options
string isd:t:o,
. The default isfile_name
d:t:i:o,/tmp/mysqld.trace
on Unix andd:t:i:O,\mysqld.trace
on Windows.Using
-DWITH_DEBUG=1
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 toP:T
.For more information, see Section 29.5.3, “The DBUG Package”.
-
Property Value Command-Line Format --debug-sync-timeout[=#]
Type Integer Controls whether the Debug Sync facility for testing and debugging is enabled. Use of Debug Sync requires that MySQL be configured with the
-DENABLE_DEBUG_SYNC=1
CMake option (see Section 2.9.4, “MySQL Source-Configuration 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.
-
Property Value Command-Line Format --default-storage-engine=name
System Variable default_storage_engine
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Enumeration Default Value InnoDB
Set the default storage engine for tables. See Chapter 16, Alternative Storage Engines. This option sets the storage engine for permanent tables only. To set the storage engine for
TEMPORARY
tables, set thedefault_tmp_storage_engine
system variable.If you disable the default storage engine at server startup, you must set the default engine for both permanent and
TEMPORARY
tables to a different engine or the server will not start. -
Property Value Command-Line Format --default-time-zone=name
Type String 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 thesystem_time_zone
system variable. --defaults-extra-file=
file_name
Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs.
file_name
is interpreted relative to the current directory if given as a relative path name rather than a full path name. This must be the first option on the command line if it is used.For additional information about this and other option-file options, see Section 4.2.8, “Command-Line Options that Affect Option-File Handling”.
Read only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs.
file_name
is interpreted relative to the current directory if given as a relative path name rather than a full path name.Exception: Even with
--defaults-file
, mysqld readsmysqld-auto.cnf
.NoteThis must be the first option on the command line if it is used, except that if the server is started with the
--defaults-file
and--install
(or--install-manual
) options,--install
(or--install-manual
) must be first.For additional information about this and other option-file options, see Section 4.2.8, “Command-Line Options that Affect Option-File Handling”.
Read not only the usual option groups, but also groups with the usual names and a suffix of
str
. For example, mysqld normally reads the[mysqld]
group. If the--defaults-group-suffix=_other
option is given, mysqld also reads the[mysqld_other]
group.For additional information about this and other option-file options, see Section 4.2.8, “Command-Line Options that Affect Option-File Handling”.
--delay-key-write[={OFF|ON|ALL}]
Property Value Command-Line Format --delay-key-write[=name]
System Variable delay_key_write
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Enumeration Default Value ON
Valid Values ON
OFF
ALL
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 theDELAY_KEY_WRITE
option.ALL
delays key writes for allMyISAM
tables. See Section 5.1.1, “Configuring the Server”, and Section 16.2.1, “MyISAM Startup Options”.NoteIf you set this variable to
ALL
, you should not useMyISAM
tables from within another program (such as another MySQL server or myisamchk) when the tables are in use. Doing so leads to index corruption.-
Property Value Command-Line Format --des-key-file=file_name
Deprecated Yes (removed in 8.0.3) This option was removed in MySQL 8.0.3.
--early-plugin-load=
plugin_list
Property Value Command-Line Format --early-plugin-load=plugin_list
Type String Default Value empty string
This option tells the server which plugins to load before loading mandatory built-in plugins and before storage engine initialization. If multiple
--early-plugin-load
options are given, only the last one is used.The option value is a semicolon-separated list of
name
=
plugin_library
andplugin_library
values. Eachname
is the name of a plugin to load, andplugin_library
is the name of the library file that contains the plugin code. If a plugin library is named without any preceding plugin name, the server loads all plugins in the library. The server looks for plugin library files in the directory named by theplugin_dir
system variable.For example, if plugins named
myplug1
andmyplug2
have library filesmyplug1.so
andmyplug2.so
, use this option to perform an early plugin load:shell> mysqld --early-plugin-load="myplug1=myplug1.so;myplug2=myplug2.so"
Quotes are used around the argument value because otherwise a semicolon (
;
) is interpreted as a special character by some command interpreters. (Unix shells treat it as a command terminator, for example.)Each named plugin is loaded early for a single invocation of mysqld only. After a restart, the plugin is not loaded early unless
--early-plugin-load
is used again.If the server is started using
--initialize
or--initialize-insecure
, plugins specified by--early-plugin-load
are not loaded.If the server is run with
--help
, plugins specified by--early-plugin-load
are loaded but not initialized. This behavior ensures that plugin options are displayed in the help message.The default
--early-plugin-load
value is empty. To load thekeyring_file
plugin, you must use an explicit--early-plugin-load
option with a nonempty value.The
InnoDB
tablespace encryption feature relies on thekeyring_file
plugin for encryption key management, and thekeyring_file
plugin must be loaded prior to storage engine initialization to facilitateInnoDB
recovery for encrypted tables. Administrators who want thekeyring_file
plugin loaded at startup should use the appropriate nonempty option value; for example,keyring_file.so
on Unix and Unix-like systems andkeyring_file.dll
on Windows.For information about
InnoDB
tablespace encryption, see Section 15.6.3.9, “Tablespace Encryption”. For general information about plugin loading, see Section 5.6.1, “Installing and Uninstalling Plugins”.-
Property Value Command-Line Format --enable-named-pipe
Platform Specific Windows Enable support for named pipes. This option applies only on Windows.
-
Property Value Command-Line Format --event-scheduler[=value]
System Variable event_scheduler
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Enumeration Default Value (>= 8.0.3) ON
Default Value (<= 8.0.2) OFF
Valid Values ON
OFF
DISABLED
Enable or disable, and start or stop, the event scheduler.
For detailed information, see The
--event-scheduler
Option. --exit-info[=
,flags
]-T [
flags
]Property Value Command-Line Format --exit-info[=flags]
Type Integer This is a bitmask of different flags that you can use for debugging the mysqld server. Do not use this option unless you know exactly what it does!
-
Property Value Command-Line Format --external-locking
Type Boolean Default Value FALSE
Enable external locking (system locking), which is disabled by default. 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.To disable external locking explicitly, use
--skip-external-locking
.External locking affects only
MyISAM
table access. For more information, including conditions under which it can and cannot be used, see Section 8.11.5, “External Locking”. -
Property Value Command-Line Format --flush
System Variable flush
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
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.5.3.3, “What to Do If MySQL Keeps Crashing”.
NoteIf
--flush
is specified, the value offlush_time
does not matter and changes toflush_time
have no effect on flush behavior. -
Property Value Command-Line Format --gdb
Type Boolean Default Value FALSE
Install an interrupt handler for
SIGINT
(needed to stop mysqld with^C
to set breakpoints) and disable stack tracing and core file handling. See Section 29.5, “Debugging and Porting MySQL”.On Windows, this option also suppresses the forking that is used to implement the
RESTART
statement: Forking enables one process to act as a monitor to the other, which acts as the server. However, forking makes determining the server process to attach to for debugging more difficult, so starting the server with--gdb
suppresses forking. For a server started with this option,RESTART
simply exits and does not restart.In non-debug settings,
--no-monitor
may be used to suppress forking the monitor process. -
Property Value Command-Line Format --general-log
System Variable general_log
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
Specify the initial general query log state. With no argument or an argument of 1, the
--general-log
option enables the log. If omitted or given with an argument of 0, the option disables the log. --initialize
,-I
Property Value Command-Line Format --initialize
Type Boolean Default Value OFF
This option is used to initialize a MySQL installation by creating the data directory and populating the tables in the
mysql
system database. For more information, see Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”.When the server is started with
--initialize
, some functionality is unavailable that limits the statements permitted in any file named by the--init-file
option. For more information, see the description of that option. In addition, thedisabled_storage_engines
system variable has no effect.The
--ndbcluster
option is ignored when used together with--initialize
.--initialize
is mutually exclusive with--daemonize
.-I
is a synonym for--initialize
.-
Property Value Command-Line Format --initialize-insecure
Type Boolean Default Value OFF
This option is used to initialize a MySQL installation by creating the data directory and populating the tables in the
mysql
system database. This option implies--initialize
. For more information, see the description of that option, and Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”.--initialize-insecure
is mutually exclusive with--daemonize
. -
Property Value Command-Line Format --init-file=file_name
System Variable init_file
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type File name Read SQL statements from this file at startup. Each statement must be on a single line and should not include comments.
If the server is started with the
--initialize
or--initialize-insecure
option, it operates in bootstap mode and some functionality is unavailable that limits the statements permitted in the file. These include statements that relate to account management (such asCREATE USER
orGRANT
), replication, and global transaction identifiers. See Section 17.1.3, “Replication with Global Transaction Identifiers”. --innodb-
xxx
Set an option for the
InnoDB
storage engine. TheInnoDB
options are listed in Section 15.13, “InnoDB Startup Options and System Variables”.-
Property Value Command-Line Format --install [service_name]
Platform Specific Windows (Windows only) Install the server as a Windows service that starts automatically during Windows startup. The default service name is
MySQL
if noservice_name
value is given. For more information, see Section 2.3.5.8, “Starting MySQL as a Windows Service”.NoteIf the server is started with the
--defaults-file
and--install
options,--install
must be first. --install-manual [
service_name
]Property Value Command-Line Format --install-manual [service_name]
Platform Specific Windows (Windows only) Install the server as a Windows service that must be started manually. It does not start automatically during Windows startup. The default service name is
MySQL
if noservice_name
value is given. For more information, see Section 2.3.5.8, “Starting MySQL as a Windows Service”.NoteIf the server is started with the
--defaults-file
and--install-manual
options,--install-manual
must be first.--language=
lang_name
, -Llang_name
Property Value Command-Line Format --language=name
Deprecated Yes; use lc-messages-dir
System Variable language
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name Default Value /usr/local/mysql/share/mysql/english/
The language to use for error messages.
lang_name
can be given as the language name or as the full path name to the directory where the language files are installed. See Section 10.11, “Setting the Error Message Language”.--lc-messages-dir
and--lc-messages
should be used rather than--language
, which is deprecated (and handled as an alias for--lc-messages-dir
). The--language
option will be removed in a future MySQL release.-
Property Value Command-Line Format --large-pages
System Variable large_pages
Scope Global Dynamic No SET_VAR
Hint AppliesNo Platform Specific Linux Type Boolean Default Value FALSE
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 operating system. Applications that perform a lot of memory accesses may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses.
MySQL supports the Linux implementation of large page support (which is called HugeTLB in Linux). See Section 8.12.3.2, “Enabling Large Page Support”. For Solaris support of large pages, see the description of the
--super-large-pages
option.--large-pages
is disabled by default. -
Property Value Command-Line Format --lc-messages=name
System Variable lc_messages
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type String Default Value en_US
The locale to use for error messages. The default is
en_US
. The server converts the argument to a language name and combines it with the value of--lc-messages-dir
to produce the location for the error message file. See Section 10.11, “Setting the Error Message Language”. -
Property Value Command-Line Format --lc-messages-dir=dir_name
System Variable lc_messages_dir
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name The directory where error messages are located. The server uses the value together with the value of
--lc-messages
to produce the location for the error message file. See Section 10.11, “Setting the Error Message Language”. -
Property Value Command-Line Format --local-service
(Windows only) A
--local-service
option following the service name causes the server to run using theLocalService
Windows account that has limited system privileges. If both--defaults-file
and--local-service
are given following the service name, they can be in any order. See Section 2.3.5.8, “Starting MySQL as a Windows Service”. -
Property Value Command-Line Format --log-error[=file_name]
System Variable log_error
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type File name Set the default error log destination to the named file. This affects log writers that base their own output destination on the default destination. See Section 5.4.2, “The Error Log”.
If the option names no file, the default error log destination on Unix and Unix-like systems is a file named
in the data directory. The default destination on Windows is the same, unless thehost_name
.err--pid-file
option is specified. In that case, the file name is the PID file base name with a suffix of.err
in the data directory.If the option names a file, the default destination is that file (with an
.err
suffix added if the name has no suffix), located under the data directory unless an absolute path name is given to specify a different location.If error log output cannot be redirected to the error log file, an error occurs and startup fails.
On Windows,
--console
takes precedence over--log-error
if both are given. In this case, the default error log destination is the console rather than a file. -
Property Value Command-Line Format --log-isam[=file_name]
Type File name Log all
MyISAM
changes to this file (used only when debuggingMyISAM
). --log-queries-not-using-indexes
Property Value Command-Line Format --log-queries-not-using-indexes
System Variable log_queries_not_using_indexes
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
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.4.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.
-
Property Value Command-Line Format --log-raw[=value]
Type Boolean Default Value OFF
Passwords in certain statements written to the general query log, slow query log, and binary log are rewritten by the server not to occur literally in plain text. Password rewriting can be suppressed for the general query log by starting the server with the
--log-raw
option. This option may be useful for diagnostic purposes, to see the exact text of statements as received by the server, but for security reasons is not recommended for production use.If a query rewrite plugin is installed, the
--log-raw
option affects statement logging as follows:For more information, see Section 6.1.2.3, “Passwords and Logging”.
-
Property Value Command-Line Format --log-short-format
Type Boolean Default Value FALSE
Log less information to the slow query log, if it has been activated.
-
Property Value Command-Line Format --log-tc=file_name
Type File name Default Value tc.log
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 path name. This option is unused. -
Property Value Command-Line Format --log-tc-size=#
Type Integer Default Value 6 * page size
Minimum Value 6 * page size
Maximum Value (64-bit platforms) 18446744073709551615
Maximum Value (32-bit platforms) 4294967295
The size in bytes of the memory-mapped transaction coordinator log. The default and minimum values are 6 times the page size, and the value must be a multiple of the page size.
--log-warnings[=
,level
]-W [
level
]Property Value Command-Line Format --log-warnings[=#]
Deprecated Yes (removed in 8.0.3) System Variable log_warnings
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Integer Default Value 2
Minimum Value 0
Maximum Value (64-bit platforms) 18446744073709551615
Maximum Value (32-bit platforms) 4294967295
This option was removed in MySQL 8.0.3. Use the
log_error_verbosity
system variable instead.-
Property Value Command-Line Format --low-priority-updates
System Variable low_priority_updates
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value FALSE
Give table-modifying operations (
INSERT
,REPLACE
,DELETE
,UPDATE
) lower priority than selects. This can also be done using{INSERT | REPLACE | DELETE | UPDATE} LOW_PRIORITY ...
to lower the priority of only one query, or bySET 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 8.11.2, “Table Locking Issues”. --min-examined-row-limit=
number
Property Value Command-Line Format --min-examined-row-limit=#
System Variable min_examined_row_limit
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Integer Default Value 0
Minimum Value 0
Maximum Value (64-bit platforms) 18446744073709551615
Maximum Value (32-bit platforms) 4294967295
When this option is set, queries which examine fewer than
number
rows are not written to the slow query log. The default is 0.-
Property Value Command-Line Format --memlock
Type Boolean Default Value FALSE
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 themlockall()
system call; this includes Solaris, most Linux distributions that use a 2.4 or higher kernel, and perhaps other Unix systems. On Linux systems, you can tell whether or notmlockall()
(and thus this option) is supported by checking to see whether or not it is defined in the systemmman.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;
ImportantUse of this option may require you to run the server as
root
, which, for reasons of security, is normally not a good idea. See Section 6.1.5, “How to Run MySQL as a Normal User”.On Linux and perhaps other systems, you can avoid the need to run the server as
root
by changing thelimits.conf
file. See the notes regarding the memlock limit in Section 8.12.3.2, “Enabling Large Page Support”.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. -
Property Value Command-Line Format --myisam-block-size=#
Type Integer Default Value 1024
Minimum Value 1024
Maximum Value 16384
The block size to be used for
MyISAM
index pages. --myisam-recover-options[=
option
[,option
]...]]Property Value Command-Line Format --myisam-recover-options[=name]
Type Enumeration Default Value OFF
Valid Values OFF
DEFAULT
BACKUP
FORCE
QUICK
Set the
MyISAM
storage engine recovery mode. The option value is any combination of the values ofOFF
,DEFAULT
,BACKUP
,FORCE
, orQUICK
. If you specify multiple values, separate them by commas. Specifying the option with no argument is the same as specifyingDEFAULT
, and specifying with an explicit value of""
disables recovery (same as a value ofOFF
). If recovery is enabled, each time mysqld opens aMyISAM
table, it checks whether the table is marked as crashed or was not 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 OFF
No recovery. DEFAULT
Recovery without backup, forcing, or quick checking. BACKUP
If the data file was changed during recovery, save a backup of the
file astbl_name
.MYD
.tbl_name-datetime
.BAKFORCE
Run recovery even if we would lose more than one row from the .MYD
file.QUICK
Do not check the rows in the table if there are not 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.Do not read any option files. If program startup fails due to reading unknown options from an option file,
--no-defaults
can be used to prevent them from being read. This must be the first option on the command line if it is used.For additional information about this and other option-file options, see Section 4.2.8, “Command-Line Options that Affect Option-File Handling”.
-
Property Value Command-Line Format --no-dd-upgrade
Introduced 8.0.4 Type Boolean Default Value FALSE
Prevents the automatic upgrade of data dictionary tables when starting the MySQL server. This option would typically be used when starting the MySQL server following an in-place upgrade of the MySQL server to a new version, which may include changes to data dictionary table definitions.
When
--no-dd-upgrade
is specified, and the server finds that the data dictionary version of the server is different from the version stored in the data dictionary, startup fails with an error stating that data dictionary upgrade is prohibited.During a normal startup, the data dictionary version of the server is compared to the version stored in the data dictionary to determine if data dictionary table definitions should be upgraded. If an upgrade is necessary and supported, the server creates data dictionary tables with updated definitions, copies persisted metadata to the new tables, atomically replaces the old tables with the new ones, and reinitializes the data dictionary. If an upgrade is not necessary, startup continues without updating data dictionary tables.
-
Property Value Command-Line Format --no-monitor
Introduced 8.0.12 Platform Specific Windows Type Boolean Default Value FALSE
(Windows only). This option suppresses the forking that is used to implement the
RESTART
statement: Forking enables one process to act as a monitor to the other, which acts as the server. For a server started with this option,RESTART
simply exits and does not restart.--no-monitor
is not available prior to MySQL 8.0.12. The--gdb
option can be used as a workaround. -
Property Value Command-Line Format --old-alter-table
System Variable old_alter_table
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
When this option is given, the server does not use the optimized method of processing an
ALTER TABLE
operation. It reverts to using a temporary table, copying over the data, and then renaming the temporary table to the original, as used by MySQL 5.0 and earlier. For more information on the operation ofALTER TABLE
, see Section 13.1.9, “ALTER TABLE Syntax”. -
Property Value Command-Line Format --old-style-user-limits
Type Boolean Default Value FALSE
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 6.3.6, “Setting Account Resource Limits”. -
Property Value Command-Line Format --open-files-limit=#
System Variable open_files_limit
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Integer Default Value 5000, with possible adjustment
Minimum Value 0
Maximum Value platform dependent
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 withsetrlimit()
. Internally, the maximum value for this option is the maximum unsigned integer value, but the actual maximum is platform dependent. 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
andtable_open_cache
to estimate whether more descriptors will be needed.On Unix, the value cannot be set greater than ulimit -n.
--performance-schema-xxx
Configure a Performance Schema option. For details, see Section 26.14, “Performance Schema Command Options”.
-
Property Value Command-Line Format --pid-file=file_name
System Variable pid_file
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type File name The path name of the process ID file. The server creates the file in the data directory unless an absolute path name is given to specify a different directory. If you specify this option, you must specify a value. If you do not specify this option, MySQL uses a default value of
, wherehost_name
.pidhost_name
is the name of the host machine.The process ID file is used by other programs such as mysqld_safe to determine the server's process ID. On Windows, this variable also affects the default error log file name. See Section 5.4.2, “The Error Log”.
Specifies an option that pertains to a server plugin. For example, many storage engines can be built as plugins, and for such engines, options for them can be specified with a
--plugin
prefix. Thus, the--innodb_file_per_table
option forInnoDB
can be specified as--plugin-innodb_file_per_table
.For boolean options that can be enabled or disabled, the
--skip
prefix and other alternative formats are supported as well (see Section 4.2.6, “Program Option Modifiers”). For example,--skip-plugin-innodb_file_per_table
disablesinnodb_file_per_table
.The rationale for the
--plugin
prefix is that it enables plugin options to be specified unambiguously if there is a name conflict with a built-in server option. For example, were a plugin writer to name a plugin “sql” and implement a “mode” option, the option name might be--sql-mode
, which would conflict with the built-in option of the same name. In such cases, references to the conflicting name are resolved in favor of the built-in option. To avoid the ambiguity, users can specify the plugin option as--plugin-sql-mode
. Use of the--plugin
prefix for plugin options is recommended to avoid any question of ambiguity.-
Property Value Command-Line Format --plugin-load=plugin_list
Type String This option tells the server to load the named plugins at startup. If multiple
--plugin-load
options are given, only the last one is used. Additional plugins to load may be specified using--plugin-load-add
options.The option value is a semicolon-separated list of
name
=
plugin_library
andplugin_library
values. Eachname
is the name of a plugin to load, andplugin_library
is the name of the library file that contains the plugin code. If a plugin library is named without any preceding plugin name, the server loads all plugins in the library. The server looks for plugin library files in the directory named by theplugin_dir
system variable.For example, if plugins named
myplug1
andmyplug2
have library filesmyplug1.so
andmyplug2.so
, use this option to perform an early plugin load:shell> mysqld --plugin-load="myplug1=myplug1.so;myplug2=myplug2.so"
Quotes are used around the argument value here because otherwise semicolon (
;
) is interpreted as a special character by some command interpreters. (Unix shells treat it as a command terminator, for example.)Each named plugin is loaded for a single invocation of mysqld only. After a restart, the plugin is not loaded unless
--plugin-load
is used again. This is in contrast toINSTALL PLUGIN
, which adds an entry to themysql.plugins
table to cause the plugin to be loaded for every normal server startup.Under normal startup, the server determines which plugins to load by reading the
mysql.plugins
system table. If the server is started with the--skip-grant-tables
option, it does not consult themysql.plugins
table and does not load plugins listed there.--plugin-load
enables plugins to be loaded even when--skip-grant-tables
is given.--plugin-load
also enables plugins to be loaded at startup that cannot be loaded at runtime.For additional information about plugin loading, see Section 5.6.1, “Installing and Uninstalling Plugins”.
-
Property Value Command-Line Format --plugin-load-add=plugin_list
Type String This option complements the
--plugin-load
option.--plugin-load-add
adds a plugin or plugins to the set of plugins to be loaded at startup. The argument format is the same as for--plugin-load
.--plugin-load-add
can be used to avoid specifying a large set of plugins as a single long unwieldy--plugin-load
argument.--plugin-load-add
can be given in the absence of--plugin-load
, but any instance of--plugin-load-add
that appears before--plugin-load
. has no effect because--plugin-load
resets the set of plugins to load. In other words, these options:--plugin-load=x --plugin-load-add=y
are equivalent to this option:
--plugin-load="x;y"
But these options:
--plugin-load-add=y --plugin-load=x
are equivalent to this option:
--plugin-load=x
For additional information about plugin loading, see Section 5.6.1, “Installing and Uninstalling Plugins”.
--port=
,port_num
-P
port_num
Property Value Command-Line Format --port=#
System Variable port
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Integer Default Value 3306
Minimum Value 0
Maximum Value 65535
The port number to use when listening for TCP/IP connections. On Unix and Unix-like systems, the port number must be 1024 or higher unless the server is started by the
root
system user. Setting this option to 0 causes the default value to be used.-
Property Value Command-Line Format --port-open-timeout=#
Type Integer Default Value 0
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.
Print the program name and all options that it gets from option files. Password values are masked. This must be the first option on the command line if it is used, except that it may be used immediately after
--defaults-file
or--defaults-extra-file
.For additional information about this and other option-file options, see Section 4.2.8, “Command-Line Options that Affect Option-File Handling”.
-
Property Value Command-Line Format --remove [service_name]
Platform Specific Windows (Windows only) Remove a MySQL Windows service. The default service name is
MySQL
if noservice_name
value is given. For more information, see Section 2.3.5.8, “Starting MySQL as a Windows Service”. -
Property Value Command-Line Format --safe-user-create
Type Boolean Default Value FALSE
If this option is enabled, a user cannot create new MySQL users by using the
GRANT
statement unless the user has theINSERT
privilege for themysql.user
system 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:This ensures that the user cannot change any privilege columns directly, but has to use the
GRANT
statement to give privileges to other users. -
Property Value Command-Line Format --secure-auth
Deprecated Yes (removed in 8.0.3) System Variable secure_auth
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value ON
Valid Values ON
This option was removed in MySQL 8.0.3.
-
Property Value Command-Line Format --secure-file-priv=dir_name
System Variable secure_file_priv
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type String Default Value platform specific
Valid Values empty string
dirname
NULL
This option sets the
secure_file_priv
system variable, which is used to limit the effect of data import and export operations, such as those performed by theLOAD DATA
andSELECT ... INTO OUTFILE
statements and theLOAD_FILE()
function. For more information, see the description ofsecure_file_priv
. -
Property Value Command-Line Format --shared-memory[={0,1}]
System Variable shared_memory
Scope Global Dynamic No SET_VAR
Hint AppliesNo Platform Specific Windows Type Boolean Default Value FALSE
Enable shared-memory connections by local clients. This option is available only on Windows.
--shared-memory-base-name=
name
Property Value Command-Line Format --shared-memory-base-name=name
System Variable shared_memory_base_name
Scope Global Dynamic No SET_VAR
Hint AppliesNo Platform Specific Windows Type String Default Value MYSQL
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.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 8.11.3, “Concurrent Inserts”.-
Property Value Command-Line Format --skip-event-scheduler
--disable-event-scheduler
Turns the Event Scheduler
OFF
. This is not the same as disabling the Event Scheduler, which requires setting--event-scheduler=DISABLED
; see The--event-scheduler
Option, for more information. -
Property Value Command-Line Format --skip-grant-tables
Type Boolean Default Value FALSE
This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases. You can cause a running server to start using the grant tables again by executing mysqladmin flush-privileges or mysqladmin reload command from a system shell, or by issuing a MySQL
FLUSH PRIVILEGES
statement after connecting to the server.If the server is started with the
--skip-grant-tables
option to disable authentication checks, the server enables--skip-networking
automatically to prevent remote connections.This option also causes the server to suppress during its startup sequence the loading of user-defined functions (UDFs), scheduled events, and plugins that were installed with the
INSTALL PLUGIN
statement. To cause plugins to be loaded anyway, use the--plugin-load
option.--skip-grant-tables
also causes thedisabled_storage_engines
system variable to have no effect.This option does not cause loading of server components to be suppressed during server startup.
FLUSH PRIVILEGES
might be executed implicitly by other actions performed after startup. For example, mysql_upgrade flushes the privileges during the upgrade procedure. -
Property Value Command-Line Format --skip-host-cache
Disable use of the internal host cache for faster name-to-IP resolution. With the cache disabled, the server performs a DNS lookup every time a client connects.
Use of
--skip-host-cache
is similar to setting thehost_cache_size
system variable to 0, buthost_cache_size
is more flexible because it can also be used to resize, enable, or disable the host cache at runtime, not just at server startup.If you start the server with
--skip-host-cache
, that does not prevent changes to the value ofhost_cache_size
, but such changes have no effect and the cache is not re-enabled even ifhost_cache_size
is set larger than 0.For more information about how the host cache works, see Section 8.12.4.2, “DNS Lookup Optimization and the Host Cache”.
Disable the
InnoDB
storage engine. In this case, because the default storage engine isInnoDB
, the server will not start unless you also use--default-storage-engine
and--default-tmp-storage-engine
to set the default to some other engine for both permanent andTEMPORARY
tables.The
InnoDB
storage engine cannot be disabled, and the--skip-innodb
option is deprecated and has no effect. Its use results in a warning. This option will be removed in a future MySQL release.-
Property Value Command-Line Format --skip-name-resolve
System Variable skip_name_resolve
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
Do not resolve host names when checking client connections. Use only IP addresses. If you use this option, all
Host
column values in the grant tables must be IP addresses. See Section 8.12.4.2, “DNS Lookup Optimization and the Host Cache”.Depending on the network configuration of your system and the
Host
values for your accounts, clients may need to connect using an explicit--host
option, such as--host=127.0.0.1
or--host=::1
.An attempt to connect to the host
127.0.0.1
normally resolves to thelocalhost
account. However, this fails if the server is run with the--skip-name-resolve
option. If you plan to do that, make sure that an account exists that can accept a connection. For example, to be able to connect asroot
using--host=127.0.0.1
or--host=::1
, create these accounts: -
Property Value Command-Line Format --skip-networking
System Variable skip_networking
Scope Global Dynamic No SET_VAR
Hint AppliesNo Do not listen for TCP/IP connections at all. All interaction with mysqld must be made using 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 permitted. See Section 8.12.4.2, “DNS Lookup Optimization and the Host Cache”.
If the server is started with the
--skip-grant-tables
option to disable authentication checks, the server enables--skip-networking
to prevent remote connections. Options that begin with
--ssl
specify whether to permit clients to connect using SSL and indicate where to find SSL keys and certificates. See Section 6.4.2, “Command Options for Encrypted Connections”.-
Property Value Command-Line Format --standalone
Platform Specific Windows Available on Windows only; instructs the MySQL server not to run as a service.
-
Property Value Command-Line Format --super-large-pages
Platform Specific Solaris Type Boolean Default Value FALSE
Standard use of large pages in MySQL attempts to use the largest size supported, up to 4MB. Under Solaris, a “super large pages” feature enables uses of pages up to 256MB. This feature is available for recent SPARC platforms. It can be enabled or disabled by using the
--super-large-pages
or--skip-super-large-pages
option. --symbolic-links
,--skip-symbolic-links
Property Value Command-Line Format --symbolic-links
Deprecated 8.0.2 Type Boolean Default Value (>= 8.0.2) OFF
Default Value (<= 8.0.1) ON
Enable or disable symbolic link support. On Unix, enabling symbolic links means that you can link a
MyISAM
index file or data file to another directory with theINDEX DIRECTORY
orDATA DIRECTORY
option of theCREATE TABLE
statement. If you delete or rename the table, the files that its symbolic links point to also are deleted or renamed. See Section 8.12.2.2, “Using Symbolic Links for MyISAM Tables on Unix”.NoteSymbolic link support, along with the the
--symbolic-links
option that controls it, is deprecated and will be removed in a future version of MySQL. In addition, the option is disabled by default. The relatedhave_symlink
system variable also is deprecated and will be removed in a future version of MySQL.This option has no meaning on Windows.
-
Property Value Command-Line Format --skip-show-database
System Variable skip_show_database
Scope Global Dynamic No SET_VAR
Hint AppliesNo This option sets the
skip_show_database
system variable that controls who is permitted to use theSHOW DATABASES
statement. See Section 5.1.8, “Server System Variables”. -
Property Value Command-Line Format --skip-stack-trace
Do not write stack traces. This option is useful when you are running mysqld under a debugger. On some systems, you also must use this option to get a core file. See Section 29.5, “Debugging and Porting MySQL”.
-
Property Value Command-Line Format --slow-query-log
System Variable slow_query_log
Scope Global Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
Specify the initial slow query log state. With no argument or an argument of 1, the
--slow-query-log
option enables the log. If omitted or given with an argument of 0, the option disables the log. -
Property Value Command-Line Format --slow-start-timeout=#
Type Integer Default Value 15000
This option controls the Windows service control manager's service start timeout. The value is the maximum number of milliseconds that the service control manager waits before trying to kill the windows service during startup. The default value is 15000 (15 seconds). If the MySQL service takes too long to start, you may need to increase this value. A value of 0 means there is no timeout.
-
Property Value Command-Line Format --socket={file_name|pipe_name}
System Variable socket
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type String Default Value (Other) /tmp/mysql.sock
Default Value (Windows) MySQL
On Unix, this option specifies the Unix socket file to use when listening for local connections. The default value is
/tmp/mysql.sock
. If this option is given, the server creates the file in the data directory unless an absolute path name is given to specify a different directory. On Windows, the option specifies the pipe name to use when listening for local connections that use a named pipe. The default value isMySQL
(not case sensitive). --sql-mode=
value
[,value
[,value
...]]Property Value Command-Line Format --sql-mode=name
System Variable sql_mode
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesYes Type Set Default Value (>= 8.0.11) ONLY_FULL_GROUP_BY STRICT_TRANS_TABLES NO_ZERO_IN_DATE NO_ZERO_DATE ERROR_FOR_DIVISION_BY_ZERO NO_ENGINE_SUBSTITUTION
Default Value (<= 8.0.4) ONLY_FULL_GROUP_BY STRICT_TRANS_TABLES NO_ZERO_IN_DATE NO_ZERO_DATE ERROR_FOR_DIVISION_BY_ZERO NO_AUTO_CREATE_USER NO_ENGINE_SUBSTITUTION
Valid Values (>= 8.0.11) ALLOW_INVALID_DATES
ANSI_QUOTES
ERROR_FOR_DIVISION_BY_ZERO
HIGH_NOT_PRECEDENCE
IGNORE_SPACE
NO_AUTO_VALUE_ON_ZERO
NO_BACKSLASH_ESCAPES
NO_DIR_IN_CREATE
NO_ENGINE_SUBSTITUTION
NO_UNSIGNED_SUBTRACTION
NO_ZERO_DATE
NO_ZERO_IN_DATE
ONLY_FULL_GROUP_BY
PAD_CHAR_TO_FULL_LENGTH
PIPES_AS_CONCAT
REAL_AS_FLOAT
STRICT_ALL_TABLES
STRICT_TRANS_TABLES
TIME_TRUNCATE_FRACTIONAL
Valid Values (>= 8.0.1, <= 8.0.4) ALLOW_INVALID_DATES
ANSI_QUOTES
ERROR_FOR_DIVISION_BY_ZERO
HIGH_NOT_PRECEDENCE
IGNORE_SPACE
NO_AUTO_CREATE_USER
NO_AUTO_VALUE_ON_ZERO
NO_BACKSLASH_ESCAPES
NO_DIR_IN_CREATE
NO_ENGINE_SUBSTITUTION
NO_FIELD_OPTIONS
NO_KEY_OPTIONS
NO_TABLE_OPTIONS
NO_UNSIGNED_SUBTRACTION
NO_ZERO_DATE
NO_ZERO_IN_DATE
ONLY_FULL_GROUP_BY
PAD_CHAR_TO_FULL_LENGTH
PIPES_AS_CONCAT
REAL_AS_FLOAT
STRICT_ALL_TABLES
STRICT_TRANS_TABLES
TIME_TRUNCATE_FRACTIONAL
Valid Values (8.0.0) ALLOW_INVALID_DATES
ANSI_QUOTES
ERROR_FOR_DIVISION_BY_ZERO
HIGH_NOT_PRECEDENCE
IGNORE_SPACE
NO_AUTO_CREATE_USER
NO_AUTO_VALUE_ON_ZERO
NO_BACKSLASH_ESCAPES
NO_DIR_IN_CREATE
NO_ENGINE_SUBSTITUTION
NO_FIELD_OPTIONS
NO_KEY_OPTIONS
NO_TABLE_OPTIONS
NO_UNSIGNED_SUBTRACTION
NO_ZERO_DATE
NO_ZERO_IN_DATE
ONLY_FULL_GROUP_BY
PAD_CHAR_TO_FULL_LENGTH
PIPES_AS_CONCAT
REAL_AS_FLOAT
STRICT_ALL_TABLES
STRICT_TRANS_TABLES
Set the SQL mode. See Section 5.1.11, “Server SQL Modes”.
NoteMySQL installation programs may configure the SQL mode during the installation process.
If the SQL mode differs from the default or from what you expect, check for a setting in an option file that the server reads at startup.
-
Property Value Command-Line Format --sysdate-is-now
Type Boolean Default Value FALSE
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 ofNOW()
. This option causesSYSDATE()
to be an alias forNOW()
. For information about the implications for binary logging and replication, see the description forSYSDATE()
in Section 12.7, “Date and Time Functions” and forSET TIMESTAMP
in Section 5.1.8, “Server System Variables”. --tc-heuristic-recover={COMMIT|ROLLBACK}
Property Value Command-Line Format --tc-heuristic-recover=name
Type Enumeration Default Value COMMIT
Valid Values COMMIT
ROLLBACK
The type of decision to use in the heuristic recovery process. To use this option, two or more storage engines that support XA transactions must be installed.
-
Property Value Command-Line Format --temp-pool
Deprecated Yes (removed in 8.0.1) Type Boolean Default Value (Other) FALSE
Default Value (Linux) TRUE
This option is obsolete and was removed in MySQL 8.0.1.
-
Property Value Command-Line Format --transaction-isolation=name
System Variable transaction_isolation
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Enumeration Default Value REPEATABLE-READ
Valid Values READ-UNCOMMITTED
READ-COMMITTED
REPEATABLE-READ
SERIALIZABLE
Sets the default transaction isolation level. The
level
value can beREAD-UNCOMMITTED
,READ-COMMITTED
,REPEATABLE-READ
, orSERIALIZABLE
. See Section 13.3.7, “SET TRANSACTION Syntax”.The default transaction isolation level can also be set at runtime using the
SET TRANSACTION
statement or by setting thetransaction_isolation
system variable. -
Property Value Command-Line Format --transaction-read-only
System Variable transaction_read_only
Scope Global, Session Dynamic Yes SET_VAR
Hint AppliesNo Type Boolean Default Value OFF
Sets the default transaction access mode. By default, read-only mode is disabled, so the mode is read/write.
To set the default transaction access mode at runtime, use the
SET TRANSACTION
statement or set thetransaction_read_only
system variable. See Section 13.3.7, “SET TRANSACTION Syntax”. --tmpdir=
,dir_name
-t
dir_name
Property Value Command-Line Format --tmpdir=dir_name
System Variable tmpdir
Scope Global Dynamic No SET_VAR
Hint AppliesNo Type Directory name 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 (:
) on Unix and semicolon characters (;
) on Windows. If the MySQL server is acting as a replication slave, you should not set--tmpdir
to point to a directory on a memory-based file system or to a directory that is cleared when the server host restarts. For more information about the storage location of temporary files, see Section B.5.3.5, “Where MySQL Stores Temporary Files”. A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables orLOAD DATA INFILE
operations. If files in the temporary file directory are lost when the server restarts, replication fails.--user={
,user_name
|user_id
}-u {
user_name
|user_id
}Property Value Command-Line Format --user=name
Type String Run the mysqld server as the user having the name
user_name
or the numeric user IDuser_id
. (“User” in this context refers to a system login account, not a MySQL user listed in the grant tables.)This option is mandatory when starting mysqld as
root
. The server changes its user ID during its startup sequence, causing it to run as that particular user rather than asroot
. See Section 6.1.1, “Security Guidelines”.To avoid a possible security hole where a user adds a
--user=root
option to amy.cnf
file (thus causing the server to run asroot
), mysqld uses only the first--user
option specified and produces a warning if there are multiple--user
options. Options in/etc/my.cnf
and$MYSQL_HOME/my.cnf
are processed before command-line options, so it is recommended that you put a--user
option in/etc/my.cnf
and specify a value other thanroot
. The option in/etc/my.cnf
is found before any other--user
options, which ensures that the server runs as a user other thanroot
, and that a warning results if any other--user
option is found.-
Property Value Command-Line Format --validate-config
Introduced 8.0.15 Type Boolean Default Value OFF
Validate the server startup configuration. If no errors are found, the server terminates with an exit code of 0. If an error is found, the server displays a diagnostic message and terminates with an exit code of 1. Warnings and information messages may also be displayed, depending on the
log_error_verbosity
value, but do not produce immediate validation termination or an exit code of 1. For more information, see Section 5.1.3, “Server Configuration Validation”. Use this option with the
--help
option for detailed help.--version
,-V
Display version information and exit.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-server-options.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.