5.1.6 Server Command Options

When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.2, “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.2.2, “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.

An embedded MySQL server usually reads options from the [server], [embedded], and [xxxxx_SERVER] groups, where xxxxx is the name of the application into which the server is embedded.

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:

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 --var_name=value. For example, --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-var_name=value at server startup.

You can change the values of most system variables at runtime with the SET statement. See Section 13.7.4.1, “SET Syntax for Variable Assignment”.

Section 5.1.7, “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.

  • --allow-suspicious-udfs

    Property Value
    Command-Line Format --allow-suspicious-udfs[={OFF|ON}]
    Type Boolean
    Default Value OFF

    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 UDF Security Precautions.

  • --ansi

    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.10, “Server SQL Modes”.

  • --basedir=dir_name, -b dir_name

    Property Value
    Command-Line Format --basedir=dir_name
    System Variable basedir
    Scope Global
    Dynamic No
    Type Directory name
    Default Value configuration-dependent default

    The path to the MySQL installation directory. This option sets the basedir system variable.

  • --bootstrap

    Property Value
    Command-Line Format --bootstrap
    Deprecated Yes

    This option is used by the mysql_install_db program to create the MySQL privilege tables without having to start a full MySQL server.

    Note

    mysql_install_db is deprecated because its functionality has been integrated into mysqld, the MySQL server. Consequently, the --bootstrap server option that mysql_install_db passes to mysqld is also deprecated. To initialize a MySQL installation, invoke mysqld with the --initialize or --initialize-insecure option. For more information, see Section 2.10.1, “Initializing the Data Directory”. mysql_install_db and the --bootstrap server option will be removed in a future MySQL release.

    --bootstrap is mutually exclusive with --daemonize, --initialize, and --initialize-insecure.

    Global transaction identifiers (GTIDs) are not disabled when --bootstrap is used. --bootstrap was used (Bug #20980271). See Section 16.1.3, “Replication with Global Transaction Identifiers”.

    When the server operates in bootstap mode, some functionality is unavailable that limits the statements permitted in any file named by the init_file system variable. For more information, see the description of that variable. In addition, the disabled_storage_engines system variable has no effect.

  • --character-set-client-handshake

    Property Value
    Command-Line Format --character-set-client-handshake[={OFF|ON}]
    Type Boolean
    Default Value ON

    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.

  • --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 limits LOAD DATA and SELECT ... INTO OUTFILE.

  • --console

    Property Value
    Command-Line Format --console
    Platform Specific Windows

    (Windows only.) Write the error log to stderr and stdout (the console). mysqld does not close the console window if this option is used.

    --console takes precedence over --log-error if both are given. (In MySQL 5.5 and 5.6, this is reversed: --log-error takes precedence over --console if both are given.)

  • --core-file

    Property Value
    Command-Line Format --core-file[={OFF|ON}]
    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.pid is written to the current working directory of the process, which for mysqld is the data directory. pid represents the process ID of the server process. On macOS, a core file named core.pid is written to the /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.

  • --daemonize

    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.10, “Managing MySQL Server with systemd”.

    --daemonize is mutually exclusive with --bootstrap, --initialize, and --initialize-insecure.

  • --datadir=dir_name, -h dir_name

    Property Value
    Command-Line Format --datadir=dir_name
    System Variable datadir
    Scope Global
    Dynamic No
    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
    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 typical debug_options string is d:t:o,file_name. The default is d:t:i:o,/tmp/mysqld.trace on Unix and d: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 to P:T.

    For more information, see Section 28.5.3, “The DBUG Package”.

  • --debug-sync-timeout[=N]

    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.7, “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 .

  • --default-time-zone=timezone

    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 the system_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.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --defaults-file=file_name

    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.

    Note

    This 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.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --defaults-group-suffix=str

    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.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --des-key-file=file_name

    Property Value
    Command-Line Format --des-key-file=file_name
    Deprecated Yes

    Read the default DES keys from this file. These keys are used by the DES_ENCRYPT() and DES_DECRYPT() functions.

    Note

    The DES_ENCRYPT() and DES_DECRYPT() functions are deprecated in MySQL 5.7, will be removed in a future MySQL release, and should no longer be used. Consequently, --des-key-file also is deprecated and will be removed.

  • --disable-partition-engine-check

    Property Value
    Command-Line Format --disable-partition-engine-check[={OFF|ON}]
    Introduced 5.7.17
    Deprecated 5.7.17
    Type Boolean
    Default Value (≥ 5.7.21) ON
    Default Value (≥ 5.7.17, ≤ 5.7.20) OFF

    Whether to disable the startup check for tables with nonnative partitioning.

    As of MySQL 5.7.17, the generic partitioning handler in the MySQL server is deprecated, and is removed in MySQL 8.0, when the storage engine used for a given table is expected to provide its own (native) partitioning handler. Currently, only the InnoDB and NDB storage engines do this.

    Use of tables with nonnative partitioning results in an ER_WARN_DEPRECATED_SYNTAX warning. In MySQL 5.7.17 through 5.7.20, the server automatically performs a check at startup to identify tables that use nonnative partitioning; for any that are found, the server writes a message to its error log. To disable this check, use the --disable-partition-engine-check option. In MySQL 5.7.21 and later, this check is not performed; in these versions, you must start the server with --disable-partition-engine-check=false, if you wish for the server to check for tables using the generic partitioning handler (Bug #85830, Bug #25846957).

    Use of tables with nonnative partitioning results in an ER_WARN_DEPRECATED_SYNTAX warning. Also, the server performs a check at startup to identify tables that use nonnative partitioning; for any found, the server writes a message to its error log. To disable this check, use the --disable-partition-engine-check option.

    To prepare for migration to MySQL 8.0, any table with nonnative partitioning should be changed to use an engine that provides native partitioning, or be made nonpartitioned. For example, to change a table to InnoDB, execute this statement:

    ALTER TABLE table_name ENGINE = INNODB;
  • --early-plugin-load=plugin_list

    Property Value
    Command-Line Format --early-plugin-load=plugin_list
    Introduced 5.7.11
    Type String
    Default Value (≥ 5.7.12) empty string
    Default Value (5.7.11) keyring_file plugin library file name

    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 and plugin_library values. Each name is the name of a plugin to load, and plugin_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 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 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.

    As of MySQL 5.7.12, the default --early-plugin-load value is empty. To load your chosen keyring plugin, you must use an explicit --early-plugin-load option with a nonempty value.

    Important

    In MySQL 5.7.11, the default --early-plugin-load value was the name of the keyring_file plugin library file, so that plugin was loaded by default. InnoDB tablespace encryption requires the keyring_file plugin to be loaded prior to InnoDB initialization, so this change of default --early-plugin-load value introduces an incompatibility for upgrades from 5.7.11 to 5.7.12 or higher. Administrators who have encrypted InnoDB tablespaces must take explicit action to ensure continued loading of the keyring_file plugin: Start the server with an --early-plugin-load option that names the plugin library file. For additional information, see Section 6.4.4.1, “Keyring Plugin Installation”.

    The InnoDB tablespace encryption feature relies on the keyring_file plugin for encryption key management, and the keyring_file plugin must be loaded prior to storage engine initialization to facilitate InnoDB recovery for encrypted tables. In MySQL 5.7.11, if you do not want to load the keyring_file plugin at server startup, specify an empty string (--early-plugin-load="").

    For information about InnoDB tablespace encryption, see Section 14.14, “InnoDB Data-at-Rest Encryption”. For general information about plugin loading, see Section 5.5.1, “Installing and Uninstalling Plugins”.

  • --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!

  • --external-locking

    Property Value
    Command-Line Format --external-locking[={OFF|ON}]
    Type Boolean
    Default Value OFF

    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”.

  • --flush

    Property Value
    Command-Line Format --flush[={OFF|ON}]
    System Variable flush
    Scope Global
    Dynamic Yes
    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.4.3.3, “What to Do If MySQL Keeps Crashing”.

    Note

    If --flush is specified, the value of flush_time does not matter and changes to flush_time have no effect on flush behavior.

  • --gdb

    Property Value
    Command-Line Format --gdb[={OFF|ON}]
    Type Boolean
    Default Value OFF

    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 28.5.1.4, “Debugging mysqld under gdb”.

  • --ignore-db-dir=dir_name

    Property Value
    Command-Line Format --ignore-db-dir=dir_name
    Deprecated 5.7.16
    Type Directory name

    This option tells the server to ignore the given directory name for purposes of the SHOW DATABASES statement or INFORMATION_SCHEMA tables. For example, if a MySQL configuration locates the data directory at the root of a file system on Unix, the system might create a lost+found directory there that the server should ignore. Starting the server with --ignore-db-dir=lost+found causes that name not to be listed as a database.

    To specify more than one name, use this option multiple times, once for each name. Specifying the option with an empty value (that is, as --ignore-db-dir=) resets the directory list to the empty list.

    Instances of this option given at server startup are used to set the ignore_db_dirs system variable.

    This option is deprecated in MySQL 5.7. With the introduction of the data dictionary in MySQL 8.0, it became superfluous and was removed in that version.

  • --initialize

    Property Value
    Command-Line Format --initialize[={OFF|ON}]
    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, “Initializing the Data Directory”.

    When the server is started with --initialize, some functionality is unavailable that limits the statements permitted in any file named by the init_file system variable. For more information, see the description of that variable. In addition, the disabled_storage_engines system variable has no effect.

    In MySQL NDB Cluster 7.5.4 and later, the --ndbcluster option is ignored when used together with --initialize. (Bug #81689, Bug #23518923)

    --initialize is mutually exclusive with --bootstrap and --daemonize.

  • --initialize-insecure

    Property Value
    Command-Line Format --initialize-insecure[={OFF|ON}]
    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, “Initializing the Data Directory”.

    --initialize-insecure is mutually exclusive with --bootstrap and --daemonize.

  • --innodb-xxx

    Set an option for the InnoDB storage engine. The InnoDB options are listed in Section 14.15, “InnoDB Startup Options and System Variables”.

  • --install [service_name]

    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 no service_name value is given. For more information, see Section 2.3.4.8, “Starting MySQL as a Windows Service”.

    Note

    If 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 no service_name value is given. For more information, see Section 2.3.4.8, “Starting MySQL as a Windows Service”.

    Note

    If the server is started with the --defaults-file and --install-manual options, --install-manual must be first.

  • --language=lang_name, -L lang_name

    Property Value
    Command-Line Format --language=name
    Deprecated Yes; use lc-messages-dir instead
    System Variable language
    Scope Global
    Dynamic No
    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.12, “Setting the Error Message Language”.

    --lc-messages-dir and --lc-messages should be used rather than --language, which is deprecated (and handled as a synonym for --lc-messages-dir). The --language option will be removed in a future MySQL release.

  • --large-pages

    Property Value
    Command-Line Format --large-pages[={OFF|ON}]
    System Variable large_pages
    Scope Global
    Dynamic No
    Platform Specific Linux
    Type Boolean
    Default Value OFF

    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.4.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.

  • --lc-messages=locale_name

    Property Value
    Command-Line Format --lc-messages=name
    System Variable lc_messages
    Scope Global, Session
    Dynamic Yes
    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.12, “Setting the Error Message Language”.

  • --lc-messages-dir=dir_name

    Property Value
    Command-Line Format --lc-messages-dir=dir_name
    System Variable lc_messages_dir
    Scope Global
    Dynamic No
    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.12, “Setting the Error Message Language”.

  • --local-service

    Property Value
    Command-Line Format --local-service

    (Windows only) A --local-service option following the service name causes the server to run using the LocalService 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.4.8, “Starting MySQL as a Windows Service”.

  • --log-error[=file_name]

    Property Value
    Command-Line Format --log-error[=file_name]
    System Variable log_error
    Scope Global
    Dynamic No
    Type File name

    Write the error log and startup messages to this file. See Section 5.4.2, “The Error Log”.

    If the option names no file, the error log file name on Unix and Unix-like systems is host_name.err in the data directory. The file name on Windows is the same, unless the --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 error log file has that name (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.

    On Windows, --console takes precedence over --log-error if both are given. In this case, the server writes the error log to the console rather than to a file. (In MySQL 5.5 and 5.6, this is reversed: --log-error takes precedence over --console if both are given.)

  • --log-isam[=file_name]

    Property Value
    Command-Line Format --log-isam[=file_name]
    Type File name

    Log all MyISAM changes to this file (used only when debugging MyISAM).

  • --log-raw

    Property Value
    Command-Line Format --log-raw[={OFF|ON}]
    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:

    • Without --log-raw, the server logs the statement returned by the query rewrite plugin. This may differ from the statement as received.

    • With --log-raw, the server logs the original statement as received.

    For more information, see Section 6.1.2.3, “Passwords and Logging”.

  • --log-short-format

    Property Value
    Command-Line Format --log-short-format[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Log less information to the slow query log, if it has been activated.

  • --log-tc=file_name

    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.

  • --log-tc-size=size

    Property Value
    Command-Line Format --log-tc-size=#
    Type Integer
    Default Value (64-bit platforms, ≥ 5.7.21) 6 * page size
    Default Value (64-bit platforms, ≤ 5.7.20) 24576
    Default Value (32-bit platforms, ≥ 5.7.21) 6 * page size
    Default Value (32-bit platforms, ≤ 5.7.20) 24576
    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. (Before MySQL 5.7.21, the default size is 24KB.)

  • --log-warnings[=level], -W [level]

    Property Value
    Command-Line Format --log-warnings[=#]
    Deprecated Yes
    System Variable log_warnings
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 2
    Minimum Value 0
    Maximum Value (64-bit platforms) 18446744073709551615
    Maximum Value (32-bit platforms) 4294967295
    Note

    The log_error_verbosity system variable is preferred over, and should be used instead of, the --log-warnings option or log_warnings system variable. For more information, see the descriptions of log_error_verbosity and log_warnings. The --log-warnings command-line option and log_warnings system variable are deprecated and will be removed in a future MySQL release.

    Whether to produce additional warning messages to the error log. This option is enabled by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. The server logs messages about statements that are unsafe for statement-based logging if the value is greater than 0. Aborted connections and access-denied errors for new connection attempts are logged if the value is greater than 1. See Section B.4.2.10, “Communication Errors and Aborted Connections”.

  • --memlock

    Property Value
    Command-Line Format --memlock[={OFF|ON}]
    Type Boolean
    Default Value OFF

    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, most Linux distributions that use a 2.4 or higher kernel, and perhaps other Unix systems. 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;
    Important

    Use 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 the limits.conf file. See the notes regarding the memlock limit in Section 8.12.4.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.

  • --myisam-block-size=N

    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.

  • --no-defaults

    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.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --old-style-user-limits

    Property Value
    Command-Line Format --old-style-user-limits[={OFF|ON}]
    Type Boolean
    Default Value OFF

    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.2.16, “Setting Account Resource Limits”.

  • --partition[=value]

    Property Value
    Command-Line Format --partition[={OFF|ON}]
    Deprecated 5.7.16
    Disabled by skip-partition
    Type Boolean
    Default Value ON

    Enables or disables user-defined partitioning support in the MySQL Server.

    This option is deprecated in MySQL 5.7.16, and is removed from MySQL 8.0 because in MySQL 8.0, the partitioning engine is replaced by native partitioning, which cannot be disabled.

  • --performance-schema-xxx

    Configure a Performance Schema option. For details, see Section 25.14, “Performance Schema Command Options”.

  • --plugin-load=plugin_list

    Property Value
    Command-Line Format --plugin-load=plugin_list
    System Variable plugin_load
    Scope Global
    Dynamic No
    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 and plugin_library values. Each name is the name of a plugin to load, and plugin_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 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 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 to INSTALL PLUGIN, which adds an entry to the mysql.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 the mysql.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.5.1, “Installing and Uninstalling Plugins”.

  • --plugin-load-add=plugin_list

    Property Value
    Command-Line Format --plugin-load-add=plugin_list
    System Variable plugin_load_add
    Scope Global
    Dynamic No
    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.5.1, “Installing and Uninstalling Plugins”.

  • --plugin-xxx

    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 for InnoDB 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.2.4, “Program Option Modifiers”). For example, --skip-plugin-innodb-file-per-table disables innodb-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.

  • --port=port_num, -P port_num

    Property Value
    Command-Line Format --port=port_num
    System Variable port