Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual

MySQL 5.5 Reference Manual  /  ...  /  Server Command Options

5.1.3 Server Command Options

When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.3, “Specifying Program Options”. The most common methods are to provide options in an option file or on the command line. However, in most cases it is desirable to make sure that the server uses the same options each time it runs. The best way to ensure this is to list them in an option file. See Section 4.2.6, “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 mysqld --help. To see the full list, use mysqld --verbose --help.

The following list shows some of the most common server options. Additional options are described in other sections:

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, --key_buffer_size=32M sets the key_buffer_size variable to a value of 32MB.

When you assign a value to a variable, MySQL might automatically correct the value to stay within a given range, or adjust the value to the closest permissible value if only certain values are permitted.

If you want to restrict the maximum value to which a variable can be set at runtime with SET, you can define this by using the --maximum-var_name=value command-line option.

You can change the values of most system variables for a running server with the SET statement. See Section 13.7.4, “SET Syntax”.

Section 5.1.4, “Server System Variables”, provides a full description for all variables, and additional information for setting them at server startup and runtime. Section 8.12.2, “Tuning Server Parameters”, includes information on optimizing the server by tuning system variables.

  • --help, -?

    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

    Command-Line Format--allow-suspicious-udfs
    Permitted ValuesTypeboolean
    DefaultFALSE

    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 24.4.2.6, “UDF Security Precautions”.

  • --ansi

    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.7, “MySQL Standards Compliance”, and Section 5.1.7, “Server SQL Modes”.

  • --basedir=dir_name, -b dir_name

    Command-Line Format--basedir=dir_name
    System VariableNamebasedir
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory name

    The path to the MySQL installation directory. All paths are usually resolved relative to this directory.

  • --big-tables

    Command-Line Format--big-tables
    System Variable (<= 5.5.2)Namebig_tables
    Variable ScopeSession
    Dynamic VariableYes
    System Variable (>= 5.5.3)Namebig_tables
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    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. Since MySQL 3.23.2, the server is able to handle large result sets automatically by using memory for small temporary tables and switching to disk tables where necessary.

  • --bind-address=addr

    Command-Line Format--bind-address=addr
    Permitted ValuesTypestring
    Default0.0.0.0

    The MySQL server listens on a single network socket for TCP/IP connections. This socket is bound to a single address, but it is possible for an address to map onto multiple network interfaces. The default address is 0.0.0.0. To specify an address explicitly, use the --bind-address=addr option at server startup, where addr is an IPv4 or IPv6 address or a host name. (IPv6 addresses are not supported before MySQL 5.5.3.) If addr is a host name, the server resolves the name to an IP address and binds to that address.

    The server treats different types of addresses as follows:

    • If the address is 0.0.0.0, the server accepts TCP/IP connections on all server host IPv4 interfaces.

    • If the address is ::, the server accepts TCP/IP connections on all server host IPv4 and IPv6 interfaces. Use this address to permit both IPv4 and IPv6 connections on all server interfaces.

    • 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 you intend to bind the server to a specific address, be sure that the mysql.user grant 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 the mysql.user table so you can still connect to the server to shut it down.

  • --binlog-format={ROW|STATEMENT|MIXED}

    Command-Line Format--binlog-format=format
    System VariableNamebinlog_format
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeenumeration
    DefaultSTATEMENT
    Valid ValuesROW
    STATEMENT
    MIXED
    Permitted Values (>= 5.5.15-ndb-7.2.1, <= 5.5.30-ndb-7.2.12)Typeenumeration
    DefaultSTATEMENT
    Valid ValuesROW
    STATEMENT
    MIXED
    Permitted Values (>= 5.5.31-ndb-7.2.13)Typeenumeration
    DefaultMIXED
    Valid ValuesROW
    STATEMENT
    MIXED

    Specify whether to use row-based, statement-based, or mixed replication. Statement-based is the default in MySQL 5.5. This is also true for MySQL Cluster NDB 7.2.1 and later. See Section 17.1.2, “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.

    Prior to MySQL 5.5, setting the binary logging format without enabling binary logging prevented the MySQL server from starting. In MySQL 5.5, the server starts in such cases, the binlog_format global system variable is set, and a warning is logged instead of an error. (Bug #42928)

  • --bootstrap

    Command-Line Format--bootstrap

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

    When the server operates in bootstap mode, 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.

  • --character-sets-dir=dir_name

    Command-Line Format--character-sets-dir=dir_name
    System VariableNamecharacter_sets_dir
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory name

    The directory where character sets are installed. See Section 10.5, “Character Set Configuration”.

  • --character-set-client-handshake

    Command-Line Format--character-set-client-handshake
    Permitted ValuesTypeboolean
    DefaultTRUE

    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

    Command-Line Format--character-set-filesystem=name
    System VariableNamecharacter_set_filesystem
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypestring
    Defaultbinary

    The file system character set. This option sets the character_set_filesystem system variable.

  • --character-set-server=charset_name, -C charset_name

    Command-Line Format--character-set-server
    System VariableNamecharacter_set_server
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypestring
    Defaultlatin1

    Use charset_name as the default server character set. See Section 10.5, “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

    Command-Line Format--chroot=dir_name
    Permitted ValuesTypedirectory 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 INFILE and SELECT ... INTO OUTFILE.

  • --collation-server=collation_name

    Command-Line Format--collation-server
    System VariableNamecollation_server
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypestring
    Defaultlatin1_swedish_ci

    Use collation_name as the default server collation. See Section 10.5, “Character Set Configuration”.

  • --console

    Command-Line Format--console
    Platform SpecificWindows

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

    As of MySQL 5.5.3, if both --log-error and --console are specified, --log-error takes precedence. The server writes to the log file, but not to the console. Before 5.5.3, whichever option is given last takes precedence.

  • --core-file

    Command-Line Format--core-file
    Permitted ValuesTypeboolean
    DefaultOFF

    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 OS X, 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.

  • --datadir=dir_name, -h dir_name

    Command-Line Format--datadir=dir_name
    System VariableNamedatadir
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory name

    The path to the data directory.

  • --debug[=debug_options], -# [debug_options]

    Command-Line Format--debug[=debug_options]
    System VariableNamedebug
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted Values (Unix)Typestring
    Defaultd:t:i:o,/tmp/mysqld.trace
    Permitted Values (Windows)Typestring
    Defaultd:t:i:O,\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 24.5.3, “The DBUG Package”.

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

    Command-Line Format--debug-sync-timeout[=#]
    Permitted ValuesTypeinteger

    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.

  • --default-character-set=charset_name

    Deprecated5.0.0
    Removed5.5.3
    Command-Line Format--default-character-set=name
    Permitted ValuesTypestring

    Use charset_name as the default character set. This option is deprecated in favor of --character-set-server. See Section 10.5, “Character Set Configuration”. --default-character-set was removed in MySQL 5.5.3.

  • --default-collation=collation_name

    Deprecated4.1.3
    Command-Line Format--default-collation=name
    Permitted ValuesTypestring

    Use collation_name as the default collation. This option is deprecated in favor of --collation-server. See Section 10.5, “Character Set Configuration”. --default-collation was removed in MySQL 5.5.3.

  • --default-storage-engine=type

    Command-Line Format--default-storage-engine=name
    System Variable (<= 5.5.2)Namestorage_engine
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    System Variable (>= 5.5.3)Namedefault_storage_engine
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted Values (<= 5.5.4)Typeenumeration
    DefaultMyISAM
    Permitted Values (>= 5.5.5)Typeenumeration
    DefaultInnoDB

    Set the default storage engine (table type) for tables. See Chapter 15, Alternative Storage Engines.

    If you disable the default storage engine at server startup, you must set the default engine to a different engine or the server will not start.

  • --default-time-zone=timezone

    Command-Line Format--default-time-zone=name
    Permitted ValuesTypestring

    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. Before MySQL 5.5.8, file_name must be the full path name to the file. As of MySQL 5.5.8, the name is interpreted relative to the current directory if given as a relative path name.

  • --defaults-file=file_name

    Use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. Before MySQL 5.5.8, file_name must be the full path name to the file. As of MySQL 5.5.8, the name is interpreted relative to the current directory if given as a relative path name.

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

  • --delay-key-write[={OFF|ON|ALL}]

    Command-Line Format--delay-key-write[=name]
    System VariableNamedelay_key_write
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeenumeration
    DefaultON
    Valid ValuesON
    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 the DELAY_KEY_WRITE option. ALL delays key writes for all MyISAM tables. See Section 8.12.2, “Tuning Server Parameters”, and Section 15.3.1, “MyISAM Startup Options”.

    Note

    If you set this variable to ALL, you should not use MyISAM tables from within another program (such as another MySQL server or myisamchk) when the tables are in use. Doing so leads to index corruption.

  • --des-key-file=file_name

    Command-Line Format--des-key-file=file_name

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

  • --enable-locking

    This option is deprecated and was removed in MySQL 5.5.3. Use --external-locking instead.

  • --enable-named-pipe

    Command-Line Format--enable-named-pipe
    Platform SpecificWindows

    Enable support for named pipes. This option applies only on Windows.

  • --enable-pstack

    Deprecated5.1.54
    Removed5.5.7
    Command-Line Format--enable-pstack
    Permitted ValuesTypeboolean
    DefaultFALSE

    This option is nonfunctional before MySQL 5.5.7 and removed in 5.5.7.

  • --engine-condition-pushdown={ON|OFF}

    Deprecated5.5.3, by optimizer_switch
    Command-Line Format--engine-condition-pushdown
    System VariableNameengine_condition_pushdown
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultON

    Sets the engine_condition_pushdown system variable. For more information, see Section 8.2.1.5, “Engine Condition Pushdown Optimization”.

  • --event-scheduler[=value]

    Command-Line Format--event-scheduler[=value]
    System VariableNameevent_scheduler
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeenumeration
    DefaultOFF
    Valid ValuesON
    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]

    Command-Line Format--exit-info[=flags]
    Permitted ValuesTypeinteger

    This is a bit mask of different flags that you can use for debugging the mysqld server. Do not use this option unless you know exactly what it does!

  • --external-locking

    Command-Line Format--external-locking
    Permitted ValuesTypeboolean
    DefaultFALSE

    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

    Command-Line Format--flush
    System VariableNameflush
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

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

  • --gdb

    Command-Line Format--gdb
    Permitted ValuesTypeboolean
    DefaultFALSE

    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 24.5, “Debugging and Porting MySQL”.

  • --general-log[={0|1}]

    Command-Line Format--general-log
    System VariableNamegeneral_log
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    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.

  • --init-file=file_name

    Command-Line Format--init-file=file_name
    System VariableNameinit_file
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypefile 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 --bootstrap 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 as CREATE USER or GRANT).

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

    Command-Line Format--install [service_name]
    Platform SpecificWindows

    (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.7.7, “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]

    Command-Line Format--install-manual [service_name]
    Platform SpecificWindows

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

    Deprecated5.5.0, by lc-messages-dir
    Command-Line Format--language=name
    System VariableNamelanguage
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory name
    Default/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.2, “Setting the Error Message Language”.

    As of MySQL 5.5, --lc-messages-dir and --lc-messages should be used rather than --language, which is deprecated and handled as an alias for --lc-messages-dir.

  • --large-pages

    Command-Line Format--large-pages
    System VariableNamelarge_pages
    Variable ScopeGlobal
    Dynamic VariableNo
    Platform SpecificLinux
    Permitted Values (Linux)Typeboolean
    DefaultFALSE

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

    Command-Line Format--lc-messages=name
    System VariableNamelc_messages
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypestring
    Defaulten_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.2, “Setting the Error Message Language”.

  • --lc-messages-dir=dir_name

    Command-Line Format--lc-messages-dir=dir_name
    System VariableNamelc_messages_dir
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory 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.2, “Setting the Error Message Language”.

  • --local-service

    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. This account is available only for Windows XP or newer. If both --defaults-file and --local-service are given following the service name, they can be in any order. See Section 2.3.7.7, “Starting MySQL as a Windows Service”.

  • --log[=file_name], -l [file_name]

    Deprecated5.1.29, by general-log
    Command-Line Format--log[=file_name]
    System VariableNamelog
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypefile name

    This option enables logging to the general query log, which contains entries that record client connections and SQL statements received from clients. The log output destination can be selected with the --log-output option. If you omit the file name, MySQL uses host_name.log as the file name. See Section 5.4.1, “Selecting General Query and Slow Query Log Output Destinations”, and Section 5.4.3, “The General Query Log”.

    The --log option is deprecated and is removed (along with the log system variable) in MySQL 5.6. Instead, use the --general_log option to enable the general query log and the --general_log_file=file_name option to set the general query log file name.

  • --log-error[=file_name]

    Command-Line Format--log-error[=file_name]
    System VariableNamelog_error
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypefile name

    Log errors and startup messages to this file. See Section 5.4.2, “The Error Log”. If you omit the file name, MySQL uses host_name.err. If the file name has no extension, the server adds an extension of .err.

  • --log-isam[=file_name]

    Command-Line Format--log-isam[=file_name]
    Permitted ValuesTypefile name

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

  • --log-long-format

    Deprecated4.1.0
    Command-Line Format--log-long-format

    Log extra information to the binary log and slow query log, if they have been activated. For example, the user name and timestamp are logged for all queries. This option is deprecated, as it now represents the default logging behavior. (See the description for --log-short-format.) The --log-queries-not-using-indexes option is available for the purpose of logging queries that do not use indexes to the slow query log. --log-long-format was removed in MySQL 5.5.3.

  • --log-output=value,...

    Command-Line Format--log-output=name
    System VariableNamelog_output
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeset
    DefaultFILE
    Valid ValuesTABLE
    FILE
    NONE

    This option determines the destination for general query log and slow query log output. The option value can be given as one or more of the words TABLE, FILE, or NONE. TABLE select logging to the general_log and slow_log tables in the mysql database as a destination. FILE selects logging to log files as a destination. NONE disables logging. If NONE is present in the option value, it takes precedence over any other words that are present. TABLE and FILE can both be given to select to both log output destinations.

    This option selects log output destinations, but does not enable log output. To do that, use the --general_log and --slow_query_log options. For FILE logging, the --general_log_file and -slow_query_log_file options determine the log file location. For more information, see Section 5.4.1, “Selecting General Query and Slow Query Log Output Destinations”.

  • --log-queries-not-using-indexes

    Command-Line Format--log-queries-not-using-indexes
    System VariableNamelog_queries_not_using_indexes
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    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.

  • --log-short-format

    Command-Line Format--log-short-format
    Permitted ValuesTypeboolean
    DefaultFALSE

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

  • --log-slow-admin-statements

    Command-Line Format--log-slow-admin-statements
    Permitted ValuesTypeboolean
    DefaultOFF

    Include slow administrative statements in the statements written to the slow query log. Administrative statements include ALTER TABLE, ANALYZE TABLE, CHECK TABLE, CREATE INDEX, DROP INDEX, OPTIMIZE TABLE, and REPAIR TABLE.

  • --log-slow-queries[=file_name]

    Deprecated5.1.29, by slow-query-log
    Command-Line Format--log-slow-queries[=name]
    System VariableNamelog_slow_queries
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean

    This option enables logging to the slow query log, which contains entries for all queries that have taken more than long_query_time seconds to execute. See the descriptions of the --log-long-format and --log-short-format options for details. The log output destination can be selected with the --log-output option. If you omit the file name, MySQL uses host_name-slow.log as the file name. See Section 5.4.1, “Selecting General Query and Slow Query Log Output Destinations”, and Section 5.4.5, “The Slow Query Log”.

    The --log-slow-queries option is deprecated and is removed (along with the log_slow_queries system variable) in MySQL 5.6. Instead, use the --slow_query_log option to enable the slow query log and the --slow_query_log_file=file_name option to set the slow query log file name.

  • --log-tc=file_name

    Command-Line Format--log-tc=file_name
    Permitted ValuesTypefile name
    Defaulttc.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

    Command-Line Format--log-tc-size=#
    Permitted Values (32-bit platforms)Typeinteger
    Default24576
    Max Value4294967295
    Permitted Values (64-bit platforms, <= 5.5.2)Typeinteger
    Default24576
    Max Value18446744073709547520
    Permitted Values (64-bit platforms, >= 5.5.3)Typeinteger
    Default24576
    Max Value18446744073709551615

    The size in bytes of the memory-mapped transaction coordinator log. The default size is 24KB.

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

    Command-Line Format--log-warnings[=#]
    System VariableNamelog_warnings
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted Values (32-bit platforms)Typeinteger
    Default1
    Min Value0
    Max Value4294967295
    Permitted Values (64-bit platforms, <= 5.5.2)Typeinteger
    Default1
    Min Value0
    Max Value18446744073709547520
    Permitted Values (64-bit platforms, >= 5.5.3)Typeinteger
    Default1
    Min Value0
    Max Value18446744073709551615

    Print out warnings such as Aborted connection... to the error log. This option is enabled (1) by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. Enabling this option by setting it greater than 0 is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written. See Section B.5.2.11, “Communication Errors and Aborted Connections”.

    If a slave server was started with --log-warnings enabled, the slave prints messages to the error log to provide information about its status, such as the binary log and relay log coordinates where it starts its job, when it is switching to another relay log, when it reconnects after a disconnect, and so forth. The server logs messages about statements that are unsafe for statement-based logging if --log-warnings is greater than 0.

  • --low-priority-updates

    Command-Line Format--low-priority-updates
    System VariableNamelow_priority_updates
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultFALSE

    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 by SET LOW_PRIORITY_UPDATES=1 to change the priority in one thread. This affects only storage engines that use only table-level locking (MyISAM, MEMORY, MERGE). See Section 8.11.2, “Table Locking Issues”.

  • --min-examined-row-limit=number

    Command-Line Format--min-examined-row-limit=#
    System VariableNamemin_examined_row_limit
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted Values (32-bit platforms)Typeinteger
    Default0
    Min Value0
    Max Value4294967295
    Permitted Values (64-bit platforms, <= 5.5.2)Typeinteger
    Default0
    Min Value0
    Max Value18446744073709547520
    Permitted Values (64-bit platforms, >= 5.5.3)Typeinteger
    Default0
    Min Value0
    Max Value18446744073709551615

    When this option is set, queries which examine fewer than number rows are not written to the slow query log. The default is 0.

  • --memlock

    Command-Line Format--memlock
    Permitted ValuesTypeboolean
    DefaultFALSE

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

    Command-Line Format--myisam-block-size=#
    Permitted ValuesTypeinteger
    Default1024
    Min Value1024
    Max Value16384

    The block size to be used for MyISAM index pages.

  • --myisam-recover[=option[,option]...]]

    This option is renamed as of MySQL 5.5.3 to --myisam-recover-options. See the description of that option for more information.

  • --myisam-recover-options[=option[,option]...]]

    Introduced5.5.3
    Command-Line Format--myisam-recover-options[=name]
    Permitted ValuesTypeenumeration
    DefaultOFF
    Valid ValuesOFF
    DEFAULT
    BACKUP
    FORCE
    QUICK

    Set the MyISAM storage engine recovery mode. The option value is any combination of the values of OFF, DEFAULT, BACKUP, FORCE, or QUICK. If you specify multiple values, separate them by commas. Specifying the option with no argument is the same as specifying DEFAULT, and specifying with an explicit value of "" disables recovery (same as a value of OFF). If recovery is enabled, each time mysqld opens a MyISAM 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.

    OptionDescription
    OFFNo recovery.
    DEFAULTRecovery without backup, forcing, or quick checking.
    BACKUPIf the data file was changed during recovery, save a backup of the tbl_name.MYD file as tbl_name-datetime.BAK.
    FORCERun recovery even if we would lose more than one row from the .MYD file.
    QUICKDo 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.

    This option was named --myisam-recover, before MySQL 5.5.3. The old option name still works because it is recognized as an unambiguous prefix of the new name, --myisam-recover-options. (Option prefix recognition occurs as described in Section 4.2.3, “Specifying Program Options”.)

    The option value OFF is available as of MySQL 5.5.3.

    See Section 15.3.1, “MyISAM Startup Options”.

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

  • --old-alter-table

    Command-Line Format--old-alter-table
    System VariableNameold_alter_table
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    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 of ALTER TABLE, see Section 13.1.7, “ALTER TABLE Syntax”.

  • --old-style-user-limits

    Command-Line Format--old-style-user-limits
    Permitted ValuesTypeboolean
    DefaultFALSE

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

  • --one-thread

    Command-Line Format--one-thread

    Only use one thread (for debugging under Linux). This option is available only if the server is built with debugging enabled. See Section 24.5, “Debugging and Porting MySQL”.

    This option is deprecated and is removed in MySQL 5.6. Use --thread_handling=no-threads instead.

  • --open-files-limit=count

    Command-Line Format--open-files-limit=#
    System VariableNameopen_files_limit
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypeinteger
    Default0
    Min Value0
    Max Valueplatform 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 with setrlimit(). 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 and table_open_cache to estimate whether more descriptors will be needed.

    On Unix, the value cannot be set less than ulimit -n.

  • --partition[=value]

    Command-Line Format--partition
    Disabled byskip-partition
    Permitted ValuesTypeboolean
    DefaultON

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

  • --pid-file=file_name

    Command-Line Format--pid-file=file_name
    System VariableNamepid_file
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypefile 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. This file is used by other programs such as mysqld_safe to determine the server's process ID.

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

  • --plugin-load=plugin_list

    Command-Line Format--plugin-load=plugin_list
    Permitted ValuesTypestring

    This option tells the server to load the named plugins at startup. All plugins to load must be named in the same --plugin-load option. If multiple --plugin-load options are given, only the last one is used.

    The 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 under configurations when plugins cannot be loaded at runtime.

    For additional information about plugin loading, see Section 5.5.2, “Installing and Uninstalling Plugins”.

  • --port=port_num, -P port_num

    Command-Line Format--port=#
    System VariableNameport
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypeinteger
    Default3306
    Min Value0
    Max Value65535

    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.

  • --port-open-timeout=num

    Command-Line Format--port-open-timeout=#
    Permitted ValuesTypeinteger
    Default0

    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-defaults

    Print the program name and all options that it gets from option files.

  • --remove [service_name]

    Command-Line Format--remove [service_name]
    Platform SpecificWindows

    (Windows only) Remove a MySQL Windows service. The default service name is MySQL if no service_name value is given. For more information, see Section 2.3.7.7, “Starting MySQL as a Windows Service”.

  • --safe-mode

    Deprecated5.5.26
    Command-Line Format--safe-mode

    Skip some optimization stages. This option is deprecated and is removed in MySQL 5.6.

  • --safe-show-database

    Deprecated4.0.2
    Removed5.5.3
    Command-Line Format--safe-show-database
    Permitted ValuesTypeboolean

    This option is deprecated and does not do anything because there is a SHOW DATABASES privilege that can be used to control access to database names on a per-account basis. See Section 6.2.1, “Privileges Provided by MySQL”. --safe-show-database was removed in MySQL 5.5.3.

  • --safe-user-create

    Command-Line Format--safe-user-create
    Permitted ValuesTypeboolean
    DefaultFALSE

    If this option is enabled, a user cannot create new MySQL users by using the GRANT statement unless the user has the INSERT privilege for the mysql.user table or any column in the table. If you want a user to have the ability to create new users that have those privileges that the user has the right to grant, you should grant the user the following privilege:

    GRANT INSERT(user) ON mysql.user TO 'user_name'@'host_name';
    

    This ensures that the user cannot change any privilege columns directly, but has to use the GRANT statement to give privileges to other users.

  • --secure-auth

    Command-Line Format--secure-auth
    System VariableNamesecure_auth
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    This option causes the server to block connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Use it to prevent all use of passwords employing the old format (and hence insecure communication over the network).

    Server startup fails with an error if this option is enabled and the privilege tables are in pre-4.1 format. See Section B.5.2.4, “Client does not support authentication protocol”.

    The mysql client also has a --secure-auth option, which prevents connections to a server if the server requires a password in old format for the client account.

    Note

    Passwords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided.

  • --secure-file-priv=dir_name

    Command-Line Format--secure-file-priv=dir_name
    System VariableNamesecure_file_priv
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypestring
    Defaultempty
    Valid Valuesempty
    dirname

    This option limits the effect of the LOAD DATA and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function to work only with files in the specified directory.

  • --shared-memory

    Command-Line Format--shared_memory[={0,1}]
    System VariableNameshared_memory
    Variable ScopeGlobal
    Dynamic VariableNo
    Platform SpecificWindows
    Permitted ValuesTypeboolean
    DefaultFALSE

    Enable shared-memory connections by local clients. This option is available only on Windows.

  • --shared-memory-base-name=name

    Command-Line Format--shared_memory_base_name=name
    System VariableNameshared_memory_base_name
    Variable ScopeGlobal
    Dynamic VariableNo
    Platform SpecificWindows
    Permitted ValuesTypestring
    DefaultMYSQL

    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.

  • --skip-concurrent-insert

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

  • --skip-event-scheduler

    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.

  • --skip-grant-tables

    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. This option also suppresses 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.

    FLUSH PRIVILEGES might be executed implicitly by other actions performed after startup. For example, mysql_upgrade flushes the privileges during the upgrade procedure.

  • --skip-host-cache

    Disable use of the internal host cache for faster name-to-IP resolution. In this case, the server performs a DNS lookup every time a client connects. See Section 8.12.6.2, “DNS Lookup Optimization and the Host Cache”.

  • --skip-innodb

    Disable the InnoDB storage engine. In this case, if the default storage engine is InnoDB, the server will not start unless you also use --default-storage-engine to set the default to some other engine.

  • --skip-name-resolve

    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 or localhost. See Section 8.12.6.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=localhost, --host=127.0.0.1, or --host=::1.

    An attempt to connect to the host 127.0.0.1 normally resolves to the localhost account. However, this fails if the server is run with the --skip-name-resolve option, so make sure that an account exists that can accept a connection. For example, to be able to connect as root using --host=127.0.0.1 or --host=::1, create these accounts:

    CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'root-password';
    CREATE USER 'root'@'::1' IDENTIFIED BY 'root-password';
    
  • --skip-networking

    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.6.2, “DNS Lookup Optimization and the Host Cache”.

  • --skip-partition

    Command-Line Format--skip-partition
     --disable-partition

    Disables user-defined partitioning. Partitioned tables can be seen using SHOW TABLES or by querying the INFORMATION_SCHEMA.TABLES table, but cannot be created or modified, nor can data in such tables be accessed. All partition-specific columns in the INFORMATION_SCHEMA.PARTITIONS table display NULL.

    Since DROP TABLE removes table definition (.frm) files, this statement works on partitioned tables even when partitioning is disabled using the option. The statement, however, does not remove .par files associated with partitioned tables in such cases. For this reason, you should avoid dropping partitioned tables with partitioning disabled, or take action to remove the orphaned .par files manually.

  • --ssl*

    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.5, “Command Options for Secure Connections”.

  • --standalone

    Command-Line Format--standalone
    Platform SpecificWindows

    Available on Windows only; instructs the MySQL server not to run as a service.

  • --super-large-pages

    Introduced5.5.3
    Command-Line Format--super-large-pages
    Platform SpecificSolaris
    Permitted Values (Solaris)Typeboolean
    DefaultFALSE

    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

    Command-Line Format--symbolic-links

    Enable or disable symbolic link support. This option has different effects on Windows and Unix:

  • --skip-safemalloc

    Removed5.5.6
    Command-Line Format--skip-safemalloc

    Previously, if MySQL was configured with full debugging support, all MySQL programs check for memory overruns during each memory allocation and memory freeing operation. This checking is very slow, so for the server you can avoid it when you do not need it by using the --skip-safemalloc option.

    safemalloc, along with this option, was removed in MySQL 5.5.6.

  • --skip-show-database

    Command-Line Format--skip-show-database
    System VariableNameskip_show_database
    Variable ScopeGlobal
    Dynamic VariableNo

    This option sets the skip_show_database system variable that controls who is permitted to use the SHOW DATABASES statement. See Section 5.1.4, “Server System Variables”.

  • --skip-stack-trace

    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 24.5, “Debugging and Porting MySQL”.

  • --skip-thread-priority

    Deprecated5.1.29
    Command-Line Format--skip-thread-priority

    Disable using thread priorities for faster response time. This option is deprecated and is removed in MySQL 5.6.

  • --slow-query-log[={0|1}]

    Command-Line Format--slow-query-log
    System VariableNameslow_query_log
    Variable ScopeGlobal
    Dynamic VariableYes
    Permitted ValuesTypeboolean
    DefaultOFF

    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.

  • --slow-start-timeout=timeout

    Introduced5.5.20
    Command-Line Format--slow-start-timeout=#
    Permitted Values (Windows)Typeinteger
    Default15000

    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.

  • --socket=path

    Command-Line Format--socket={file_name|pipe_name}
    System VariableNamesocket
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypestring
    Default/tmp/mysql.sock

    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 is MySQL (not case sensitive).

  • --sql-mode=value[,value[,value...]]

    Command-Line Format--sql-mode=name
    System VariableNamesql_mode
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Permitted ValuesTypeset
    Default''
    Valid ValuesALLOW_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.7, “Server SQL Modes”.

    Note

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

  • --sysdate-is-now

    Command-Line Format--sysdate-is-now
    Permitted ValuesTypeboolean
    DefaultFALSE

    SYSDATE() by default returns the time at which it executes, not the time at which the statement in which it occurs begins executing. This differs from the behavior of NOW(). This option causes SYSDATE() to be an alias for NOW(). For information about the implications for binary logging and replication, see the description for SYSDATE() in Section 12.7, “Date and Time Functions” and for SET TIMESTAMP in Section 5.1.4, “Server System Variables”.

  • --tc-heuristic-recover={COMMIT|ROLLBACK}

    Command-Line Format--tc-heuristic-recover=name
    Permitted ValuesTypeenumeration
    DefaultCOMMIT
    Valid ValuesCOMMIT
    ROLLBACK

    The type of decision to use in the heuristic recovery process. This option is unused.

  • --temp-pool

    Command-Line Format--temp-pool
    Permitted ValuesTypeboolean
    DefaultTRUE

    This option causes most temporary files created by the server to use a small set of names, rather than a unique name for each new file. This works around a problem in the Linux kernel dealing with creating many new files with different names. With the old behavior, Linux seems to leak memory, because it is being allocated to the directory entry cache rather than to the disk cache. This option is ignored except on Linux.

  • --transaction-isolation=level

    Command-Line Format--transaction-isolation=name
    Permitted ValuesTypeenumeration
    DefaultREPEATABLE-READ
    Valid ValuesREAD-UNCOMMITTED
    READ-COMMITTED
    REPEATABLE-READ
    SERIALIZABLE

    Sets the default transaction isolation level. The level value can be READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. See Section 13.3.6, “SET TRANSACTION Syntax”.

    The default transaction isolation level can also be set at runtime using the SET TRANSACTION statement or by setting the tx_isolation system variable.

  • --tmpdir=dir_name, -t dir_name

    Command-Line Format--tmpdir=dir_name
    System VariableNametmpdir
    Variable ScopeGlobal
    Dynamic VariableNo
    Permitted ValuesTypedirectory 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 or LOAD 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}

    Command-Line Format--user=name
    Permitted ValuesTypestring

    Run the mysqld server as the user having the name user_name or the numeric user ID user_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 as root. See Section 6.1.1, “Security Guidelines”.

    To avoid a possible security hole where a user adds a --user=root option to a my.cnf file (thus causing the server to run as root), 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 than root. The option in /etc/my.cnf is found before any other --user options, which ensures that the server runs as a user other than root, and that a warning results if any other --user option is found.

  • --verbose, -v

    Use this option with the --help option for detailed help.

  • --version, -V

    Display version information and exit.


User Comments
  Posted by Dathan Pattishall on June 8, 2004
open_files_limit: If your mysql server process runs as mysql then the setrlimit will not raise higher then the calling safe_mysqld process. Thus relying on max_connections*5 does not work for a Linux ulimit. Use open_files_limit to go beyond 1024.
  Posted by Chris Foote on September 25, 2006
To get the server listening on all interfaces, use 0.0.0.0 as the bind address. i.e.:

--bind-address=0.0.0.0

  Posted by Van Stokes on April 30, 2013
OS: Ubuntu (Debian) deployments
Option: open-files-limit

It seems that the Debian upstart doesn't use the parameters defined at /etc/security/limits.conf, so when you launch mysql through the service command (and so, under upstart), it overrides those defined limits and uses the default 1024.

The solution is to modify the mysql.conf file that defines the upstart service, it is located at /etc/init/mysql.conf and add the following lines before the pre-start block:

# NB: Upstart scripts do not respect
# /etc/security/limits.conf, so the open-file limits
# settings need to be applied here.
limit nofile 32000 32000
limit nproc 32000 32000

References:
http://serverfault.com/questions/440878/changing-open-files-limit-in-mysql-5-5
http://askubuntu.com/questions/288471/cant-open-files-after-updating-server-what-changed

Sign Up Login You must be logged in to post a comment.