mysqld

mysqld

mysqld is the MySQL server. It provides database access to client programs, so it must be running or clients cannot use databases administered by the server. When mysqld starts up, it opens network ports to listen on and then waits for client connections. mysqld is multi-threaded and processes each client connection using a separate thread to provide concurrency among clients. Queries that write to the database are executed atomically; when the server begins executing such a query, it will execute no other query for the data involved until the current query has finished. For example, no two clients can ever modify the same row in a table at the same time.

Usage

The usual invocation sequence is simply the server name followed by any desired options:

 mysqld [options]  

On Windows NT-based systems, a server can be installed to run as a service. For example, the mysqld-nt server might be installed to run automatically at system startup time or removed as a service as follows:

 C:\> mysqld-nt --install  C:\> mysqld-nt --remove 

The default service name is MySql. As of MySQL 4.0.2, you can provide a service name following the option:

 C:\> mysqld-nt --install service_name  C:\> mysqld-nt --remove service_name 

This allows multiple servers to be run under different service names. With no service_name argument, MySql is used as the service name and the server reads the [mysqld] group from option files at startup time. With a service_name argument, that name becomes the service name and the server reads the [service_name] group from option files at startup time.

As of MySQL 4.0.3, you can also provide a --defaults-file option following the service name to specify an additional file of options for the server to read at startup time:

 C:\> mysqld-nt --install service_name --defaults-file=file_name  

In this case, the service_name argument is not optional.

The preceding remarks about --install apply to --install-manual as well. (In addition, the modifications allowing you to specify arguments after --install have been backported into the 3.23 series beginning with MySQL 3.23.54.)

Standard Options Supported by mysqld

 --character-sets-dir         --help                   --socket  --debug                      --port                   --user --default-character-set      --set-variable           --version 

--character-sets-dir and --default-character-set are available as of MySQL 3.23.14. As of MySQL 4, mysqld also supports the standard SSL options.

Note that although --socket is supported, the corresponding short form (-S) is not.

On UNIX, if the --user option is given, it specifies the username of the account to use for running the server. In this case, when the server starts up, it looks up the user and group ID values of the account from the password file and then changes its user and group IDs to match. In this way, the server runs with the privileges associated with that user, not root privileges. (The server must be started as root for the --user option to be effective; it will not be able to change its user ID otherwise.) As of MySQL 4.0.2, the --user option value can be the numeric user ID.

Options Specific to mysqld

The first section of options listed here are general options. It is followed by sections that list options specific to Windows, to particular table handlers, and to replication.

  • --ansi, -a

    Tell the server to use ANSI behavior for certain types of SQL syntax, rather than MySQL-specific syntax. This option can be used to make the server more ANSI compliant.

    This option was introduced in MySQL 3.23.6. It is equivalent to using the --sql-mode option with the REAL_AS_FLOAT, PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, SERIALIZE, and ONLY_FULL_GROUP_BY flags.

  • --basedir=dir_name, -b dir_name

    The pathname to the MySQL installation directory. Many other pathnames are resolved beginning at this directory if they are given as relative pathnames.

  • --big-tables

    Allow large result sets to be processed by saving all temporary results to disk rather than by holding them in memory. This avoids most "table full" messages that occur as a result of having insufficient memory to hold large result sets. This option is unnecessary as of MySQL 3.23.

  • --bind-address=ip_addr

    Bind to the given IP address. Normally, mysqld binds to the default IP address for the host on which the server is running. This option can be used to select an alternative address to bind to if the host has multiple addresses.

  • --bootstrap

    This option is used by installation scripts when you first install MySQL. It was introduced in MySQL 3.22.10.

  • --chroot=dir_name, -r dir_name

    Run the MySQL server anchored to the given directory as its root directory. See the chroot(), UNIX manual page for more information on running in a chroot()-ed environment. This option was introduced in MySQL 3.22.2.

  • --concurrent-insert (boolean)

    Allow concurrent inserts on MyISAM tables or disallow them with --skip-concurrent-insert. If a MyISAM table has no holes, concurrent inserts add new records at the end of the table while retrievals are being performed on the existing rows. This option was introduced as a boolean option in MySQL 4.0.2. From 3.23.25 to 4.0.1, only --skip-concurrent-insert may be used.

  • --core-file

    Cause a core file to be generated before exiting when a fatal error occurs. This option was introduced in MySQL 3.23.23.

  • --datadir=dir_name, -h dir_name

    The pathname to the MySQL data directory.

  • --default-table-type=type

    The default table storage type to use. The type value should be the name of one of the table handlers that the server supports, such as ISAM, MyISAM, HEAP, BDB, or InnoDB. (The value is not case sensitive.) If this option is not specified, the server uses whatever default type was compiled into it at build time (usually MyISAM). This option was introduced in MySQL 3.23.

  • --delay-key-write=val

    Set the mode used by the server for handling delayed key writes for MyISAM files. val can be ON (delay key writes on a per-table basis, according to any DELAY_KEY_WRITE value specified when tables were created; this is the default), OFF (never delay key writes for any MyISAM table), or ALL (delay key writes for all MyISAM tables). OFF and ALL enforce a policy that is applied regardless of how tables were declared when they were created.

    It's common to run replication slave servers with --delay-key-write=ALL to obtain increased performance for MyISAM tables by delaying key writes no matter how the tables were created originally.

    This option was introduced in MySQL 3.23.3 and renamed to --delay-key-write-for-all-tables in 3.23.11. As of MySQL 4.0.3, it can be used again. In the interim, you can use --skip-delay-key-write to achieve the same effect as OFF.

  • --des-key-file=file_name

    The name of the file that holds DES keys for the DES_ENCRYPT() and DES_DECRYPT() functions. For a description of the format of this file, see the entry for DES_ENCRYPT() in Appendix C. This option was introduced in MySQL 4.0.1.

  • --enable-locking

    See the description for --external-locking. This option is deprecated as of MySQL 4.0.3.

  • --enable-pstack (boolean)

    Enable symbolic stack printing when an error occurs. This option was introduced in MySQL 4.0.0.

  • --exit-info[=n], -T [n]

    Cause the server to debugging information when it terminates. If n is specified after -T, there must be no intervening space or the value will not be interpreted correctly. This option was introduced in MySQL 3.22.

  • --external-locking (boolean)

    Enable external locking (file system locking) for systems such as Linux where external locking is off by default. This option was introduced in MySQL 4.0.3 as a boolean option. Prior to that, use --enable-locking or --skip-locking to enable or disable external locking.

    External locking is effective only for operations such as table checking that just read tables. For operations that modify tables, such as repairs, you should bring down the server while running isamchk or myisamchk to avoid the risk of table damage. (See Chapter 13 for details.) In general, it is preferable to use mysqlcheck rather than myisamchk if possible. mysqlcheck tells the server to do the work, so there is no need to coordinate with the server explicitly or to know anything about external locking.

  • --flush

    Flush all tables to disk after each update. This reduces the risk of table corruption in the event of a crash but seriously degrades performance. Thus, it is useful only if you have an unstable system. This option was introduced in MySQL 3.22.9. It applies only to MyISAM and ISAM tables.

  • --init-file=file_name

    Name a file of SQL statements to be executed at startup time. A relative filename is interpreted starting at the data directory. The file should contain one statement per line.

  • --language=lang_name, -L lang_name

    Display error messages to clients in the specified language. Normally, lang_name will be a value such as english or german, but it can also be the full pathname to the directory containing the language files.

  • --local-infile (boolean)

    Allow or disallow LOAD DATA LOCAL. As of MySQL 3.23.49, LOCAL capabilities may be present but disabled by default. Invoke the server with the --local-infile option to enable LOCAL on the server side. This option can also be used to disable LOCAL from the server side if it is enabled by default: Use --disable-local-infile as of MySQL 4.0.2, --local-infile=0 before that.

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

    Turn on logging to the general log file. The general log contains information about client connections and queries. If file_name is not given, the log filename is HOSTNAME.log in the data directory, where HOSTNAME is the name of the server host. If file_name is given as a relative path, it is interpreted starting at the data directory. If file_name is specified after -l, there must be no intervening space or the value will not be interpreted correctly.

  • --log-bin[=file_name]

    Enable the binary update log. If file_name is not given, the log filename is HOSTNAME-bin.nnn in the data directory, where HOSTNAME is the name of the server host and nnn is a sequence of numbers incremented by one each time a new log is created. If file_name is given as a relative path, it is interpreted starting at the data directory. This option was introduced in MySQL 3.23.14.

  • --log-bin-index=file_name

    Enable the binary update log index file. If file_name is given as a relative path, it is interpreted starting at the data directory. This option was introduced in MySQL 3.23.15.

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

    Turn on slow-query logging to the named file. If no file is named, the default name is HOSTNAME-slow.log in the data directory, where HOSTNAME is the name of the server host. If file_name is given as a relative path, it is interpreted starting at the data directory. This option was introduced in MySQL 3.23.9.

  • --log-isam[=file_name]

    Enable index file logging. This is used only for debugging ISAM/MyISAM operations. If you specify no name, the default is myisam.log in the data directory.

  • --log-long-format

    Write additional information to the update log and to the slow-query log. This option was introduced in MySQL 3.22.7.

  • --log-update[=file_name]

    Turn on logging to the update log file. The update log contains the text of any query that modifies database tables. If file_name is not given, the update log filename is HOSTNAME.nnn in the data directory, where HOSTNAME is the name of the server host and nnn is a sequence number one greater than that of the previous update log.

    If file_name is given and the final component contains no extension, the server adds a numeric extension of the form nnn with a value as previously described. If the final component of the pathname includes an extension, that name is used without modification as the update log filename. If file_name is given as a relative path, it is interpreted starting at the data directory.

    The update log is deprecated as of MySQL 3.23.14, the version in which the binary update log was introduced.

  • --log-warnings (boolean)

    Write certain non-critical warning messages to the log file. This option was introduced as --warnings in MySQL 3.23.40 and renamed to --log-warnings in 4.0.3.

  • --low-priority-updates

    Give updates lower priority than retrievals. This option was introduced in MySQL 3.23. (It was called --low-priority-inserts from MySQL 3.22.5 until MySQL 3.23.)

  • --memlock (boolean)

    Lock the server in memory if possible. This option was introduced in MySQL 3.23.25. It is effective only on Solaris, and only if the server is run as root.

  • --myisam-recover=level

    Control the type of automatic MyISAM table checking that the server performs at startup time. level can be empty to disable checking or a comma-separated list of one or more of the following values: DEFAULT (same as specifying no option), BACKUP (create a backup of the table if it is changed), FORCE (force recovery even if more than a row of data will be lost), or QUICK (quick recovery). This option was introduced in MySQL 3.23.25.

  • --new, -n

    Use new, possibly unsafe routines. These are features in MySQL that are not yet declared stable. This option should be used only if you are feeling adventurous.

  • --old-protocol, -o

    Use the protocol that was used for client/server communications prior to MySQL 3.21. This option may be needed if the server communicates with very old client programs.

  • --old-passwords

    As of MySQL 4.1, the server supports a new password encryption method. Existing accounts that have passwords encrypted the old way are still supported, but new passwords will be encrypted using the new method. Use this option to force the old method to be used even for new passwords. (This can be useful if you want to be able to downgrade the server or move the accounts to an older server.) This option was introduced in MySQL 4.1.

  • --one-thread

    Run using a single thread; used for debugging under Linux, which normally uses three threads at a minimum. This option was introduced in MySQL 3.22.2.

  • --pid-file=file_name

    When mysqld starts up, it writes its process ID (PID) into a file. This option specifies the pathname of the PID file. The file can be used by other processes to determine the server's process number, typically for purposes of sending a signal to it. For example, mysql.server reads the file when it sends a signal to the server to shut down. This option has no effect on Windows or for the embedded server. If file_name is given as a relative path, it is interpreted starting at the data directory.

  • --safe-mode

    This option is like --skip-new but disables even more things. You can try it if MySQL appears to be unstable or if complex queries seem to yield incorrect results. If using this option improves server operation, please note that fact when you use mysqlbug to report the problems you encounter.

  • --safe-show-database (boolean)

    Don't show the names of databases to users who have no privileges for accessing them. This option was introduced in MySQL 3.23.30. However, it is deprecated as of MySQL 4.0.2 when the SHOW DATABASES privilege was introduced to allow control over the ability to see database names.

  • --safe-user-create (boolean)

    Disallow account creation by users who do not have write access to the user grant table. This option was introduced in MySQL 3.23.41.

  • --safemalloc-mem-limit=n

    Simulate a memory shortage. The value represents the limit on the amount of memory available for allocation. This option can be used only if the server was built with the --with-debug=full option at configuration time. This option was introduced in MySQL 3.23.28.

  • --skip-concurrent-insert

    See the description for --concurrent-insert.

  • --skip-grant-tables, -Sg (boolean)

    Disable use of the grant tables for verifying client connections. This gives any client full access to do anything. It also disables the GRANT and REVOKE statements. You can tell the server to begin using the grant tables again by issuing a FLUSH PRIVILEGES statement or a mysqladmin flush-privileges command.

    The -Sg form of this option is unavailable as of MySQL 4.0.0.

  • --skip-host-cache

    Disable use of the hostname cache.

  • --skip-locking

    See the description for --external-locking. This option is deprecated as of MySQL 4.0.3.

  • --skip-name-resolve

    Do not try to resolve hostnames. If this option is specified, the grant tables must specify hosts by IP number or as localhost.

  • --skip-networking

    Do not allow TCP/IP connections. Only local clients can connect and must do so using the UNIX socket by specifying a hostname of localhost.

  • --skip-new

    Do not use new, possibly unsafe routines. See the description for --new.

  • --skip-safemalloc

    Do not perform memory allocation checking. This option can be used only if the server was built with the --with-debug=full option at configuration time. This option was introduced in MySQL 3.23.37.

  • --skip-show-database

    Do not allow unprivileged users to issue SHOW DATABASES queries or to use SHOW TABLES on databases for which they have no access. This option was introduced in MySQL 3.23.

  • --skip-stack-trace

    Don't print a stack trace when failure occurs. This option was introduced in MySQL 3.23.38.

  • --skip-symlink

    Disallow table symlinking. This option was introduced in MySQL 3.23.39.

  • --skip-thread-priority

    Normally, updates (queries that modify tables) run at a higher priority than those that retrieve data. If that is undesirable, this option causes the server not to give different priorities to different types of queries.

  • --sql-bin-update-same (boolean)

    Yoke together SQL_LOG_BIN and SQL_LOG_UPDATE so that setting one (with the SET statement) sets the other as well. This option was introduced in MySQL 3.23.16.

  • --sql-mode=flags

    This option modifies certain aspects of the server's behavior to cause it to act according to ANSI SQL or to be compatible with older servers. flags should be a comma-separated list of one or more of the following options:

    • ANSI_QUOTES

      Treat double quote as the quote character for identifiers, such as database, table, and column names, and not as a string quote character. (Backticks are still allowed for name quoting.)

    • IGNORE_SPACE

      Allow spaces between function names and the following opening parenthesis. This results in function names being treated as reserved words.

    • NO_UNSIGNED_SUBTRACTION

      As of MySQL 4, subtraction between integer operands results in an unsigned result if either operand is unsigned. This option allows signed results, which is compatible with the behavior of MySQL prior to version 4.

    • ONLY_FULL_GROUP_BY

      Normally, MySQL allows SELECT statements with columns in the output column list that are not named in the GROUP BY clause:

       SELECT a, b, COUNT(*) FROM t GROUP BY a;  

      The ONLY_FULL_GROUP_BY flag requires output columns to be named in the GROUP BY:

       SELECT a, b, COUNT(*) FROM t GROUP BY a, b;  
    • PIPES_AS_CONCAT

      Treat || as a string concatenation operator rather than as logical OR.

    • REAL_AS_FLOAT

      The REAL column type becomes a synonym for FLOAT rather than for DOUBLE.

    • SERIALIZE

      Use SERIALIZABLE as the default transaction isolation level.

    --sql-mode is similar to --ansi in that it allows ANSI behaviors to be enabled, but is more flexible because features can be selected on an individual basis. Note also that NO_UNSIGNED_SUBTRACTION behavior can be selected only with --sql-mode.

    The --sql-mode option was introduced in MySQL 3.23.41. The NO_UNSIGNED_SUBTRACTION flag value was introduced in MySQL 4.0.0.

  • --temp-pool (boolean)

    With this option, the server uses a small set of names for temporary files rather than creating a unique name for each file. This avoids some caching problems on Linux. This option was introduced in MySQL 3.23.33; it is enabled by default as of MySQL 4.0.3.

  • --transaction-isolation=level

    Set the default transaction isolation level. The allowable level values are READ-UNCOMMITTEDREAD-COMMITTED, REPEATABLE-READ, and SERIALIZABLE., This option was introduced in MySQL 3.23.26.

  • --tmpdir=dir_name, -t dir_name

    The pathname of the directory to use for temporary files. This option was introduced in MySQL 3.22.4. As of MySQL 4.1, the option value can be given as a list of directories to be used in round-robin fashion. Under UNIX, separate directory names by colons; under Windows, separate them by semicolons.

  • --warnings

    See the description for --log-warnings.

Windows Options

The options in this section are available only for servers running under Windows. Several of them are service-related and apply only to Windows NT-based systems.

  • --console (boolean)

    Display a console window for error messages. This option was introduced in MySQL 3.22.4.

  • --enable-named-pipe (boolean)

    Prior MySQL 3.23.50 named piped are enabled by default for NT servers that support them (that is, servers with -nt in their name). As of 3.23.50, named pipes are disabled by default; this option can be used to turn named pipe support on.

    Note that enabling named pipes may cause problems at server shutdown time, for which reason you should avoid doing so if possible.

  • --install

    Install the server as a service that runs automatically when Windows starts up. (Windows NT systems only.)

  • --install-manual

    Install the server as a service that does not run automatically when Windows starts up. You must explicitly start the service yourself. This option was introduced in MySQL 3.23.44. (Windows NT systems only.)

  • --remove

    Remove the server as a service. (Windows NT systems only.)

  • --standalone

    Run the server as a standalone program rather than as a service. (Windows NT systems only.)

  • --use-symbolic-links (boolean)

    Support symbolic linking of database directories. This option was introduced in MySQL 3.23.17. As of MySQL 4.0, database symlinking support is enabled by default; use --skip-symlink to disable it.

BDB Options

The options in this section are specific to the BDB table handler.

  • --bdb-home=dir_name

    The BDB home directory. If specified explicitly, the value should be the same as for --datadir. This option was introduced in MySQL 3.23.14.

  • --bdb-lock-detect=val

    Set the BDB deadlock detection/resolution mode. val should be one of the following values indicating how to choose a transaction to abort when it becomes necessary to break a deadlock: YOUNGEST (most recently started transaction), OLDEST (longest-lived transaction), RANDOM (a randomly chosen transaction), or DEFAULT (transaction chosen using the default policy, which currently is the same as RANDOM). This option was introduced in MySQL 3.23.15.

  • --bdb-logdir=dir_name

    The pathname to the directory where the BDB handler writes log files. This option was introduced in MySQL 3.23.14.

  • --bdb-no-recover

    Tell the BDB handler not to attempt auto-recovery of BDB files at startup time. It can be useful for getting the server running in some cases when it exits at startup due to auto-recovery failure. This option was introduced in MySQL 3.23.30. (The --bdb-recover option is used from 3.23.16 to 3.23.29, but with the opposite meaning.)

  • --bdb-no-sync

    Don't flush BDB logs synchronously. This option was introduced in MySQL 3.23.14.

  • --bdb-shared-data

    Start the BDB handler in multi-process mode. This option was introduced in MySQL 3.23.29.

  • --bdb-tempdir=dir_name

    The pathname to the directory where the BDB handler writes temporary files. This option was introduced in MySQL 3.23.14.

  • --skip-bdb

    Disable the BDB table handler. If you don't use BDB tables, this option saves memory. It was introduced in MySQL 3.23.15.

InnoDB Options

The options in this section are specific to the InnoDB table handler. Many of the InnoDB options were introduced in MySQL 3.23.29 under names beginning with --innobase and renamed in 3.23.37 to begin with --innodb.

  • --innodb_data_file_path=filespec_list

    The specifications for the InnoDB tablespace component files. The format of the option value is discussed in the InnoDB configuration instructions in Chapter 11. This option was introduced in MySQL 3.23.37.

  • --innodb_data_home_dir=dir_name

    The pathname to the directory under which the InnoDB tablespace components are located. This option was introduced in MySQL 3.23.37.

  • --innodb_fast_shutdown (boolean)

    Speed up the server shutdown process; the InnoDB handler skips some of the operations that it performs normally. This option was introduced in MySQL 3.23.44.

  • --innodb_flush_log_at_trx_commit=n

    This option has a value of 1 by default, which causes InnoDB log flushing when transactions are committed. Setting the option to zero will reduce the amount of flushing to disk that InnoDB performs. However, this comes at a somewhat increased potential for losing a few of the most recent committed transactions if a crash occurs. The possible values are as follows:

    Value Meaning
    0 Write to log once per second and flush to disk
    1 Write to log at each commit and flush to disk
    2 Write to log at each commit, but flush to disk only once per second

    This option was introduced in MySQL 3.23.37. An option value of 2 is allowed as of MySQL 3.23.52.

  • --innodb_flush_method=val

    This option applies only on UNIX. It specifies the method used to flush data to the InnoDB logs. The allowable values are fdatasync (the default) and O_DSYNC. This option was introduced in MySQL 3.23.39.

  • --innodb_log_group_home_dir=dir_name

    The pathname to the directory where the InnoDB handler should write its log files. This option was introduced in MySQL 3.23.37.

  • --innodb_log_arch_dir=dir_name

    This option is not currently used. It was introduced in MySQL 3.23.37.

  • --innodb_log_archive=n

    This option is not currently used. It was introduced in MySQL 3.23.37.

  • --skip-innodb

    Disable the InnoDB table handler. If you don't use InnoDB tables, this option saves memory. This option was introduced as --skip-innobase in MySQL 3.23.26 and renamed to --skip-innodb in 3.23.37.

Replication Options

The options in this section pertain to MySQL's replication capabilities.

For a replication slave server, several options are used in conjunction with the master information file (named master.info in the data directory by default). When the server starts up, if no master.info file exists, it uses the values of the --master-host, --master-user, --master-password, --master-port, and --master-connect-retry options when establishing the connection to the master server. It also saves the values in the master.info file. If the file does exist when the slave starts up, it uses the contents of the file and ignores the options. You must remove the file and restart the server for the options to take effect. The name of the file itself can be changed with the --master-info-file option.

  • --abort-slave-event-count=n

    This option is used by mysql-test-run for replication testing. It was introduced in MySQL 3.23.28.

  • --binlog-do-db=db_name

    For a replication master, log updates only for the named database. No other databases will be replicated. To log updates for multiple databases, repeat the option once for each database name. This option was introduced in MySQL 3.23.23.

  • --binlog-ignore-db=db_name

    For a replication master, do not log updates for the named database. To ignore updates for multiple databases, repeat the option once for each database name. This option was introduced in MySQL 3.23.23.

  • --disconnect-slave-event-count=n

    This option is used by mysql-test-run for replication testing. It was introduced in MySQL 3.23.28.

  • --init-rpl-role=val

    Indicate the replication role; val can be master or slave. This option is used by the mysql-test-run script for replication testing. It was introduced in MySQL 4.0.0.

  • --log-slave-updates (boolean)

    This option causes a replication slave to log updates that it receives from the master server to its own binary update log. It's necessary to do this if the slave acts as a master to another server (that is, if you chain slave servers). This option was introduced in MySQL 3.23.17.

  • --master-connect-retry=n

    For a replication slave, the number of seconds between attempts to connect to the master if the master is unavailable. This option was introduced in MySQL 3.23.15.

  • --master-host=host_name

    For a replication slave, the host where the master server is running. host_name can be given as a name or IP number. This option was introduced in MySQL 3.23.15.

  • --master-info-file=file_name

    For a replication slave, the name of the file that stores information about the current replication state. The contents of this file are the replication coordinates (master binary update log name and position), master host, username, password, port number, and connection retry interval. The default name for this file is master.info in the data directory. This option was introduced in MySQL 3.23.15.

  • --master-password=pass_val

    For a replication slave, the password of the account it uses for connecting to the master server. If no password is given, the default is the empty password. This option was introduced in MySQL 3.23.15.

  • --master-port=port_num

    For a replication slave, the TCP/IP port to use for connecting to the master server. If no port is given, the default port number compiled into the server is used (usually 3306). This option was introduced in MySQL 3.23.15.

  • --master-retry-count=n

    For a replication slave, the number of times to attempt a connection to a master server before giving up. This option was introduced in MySQL 3.23.43.

  •  --master-ssl (boolean) --master-ssl-cert=file_name --master-ssl-key=file_name 

    These options were introduced in MySQL 4.0.0, but are unimplemented. They are reserved for future use to allow replication over secure connections. (This set of options is incomplete at the moment, anyway. --master-ssl-ca and --master-ssl-cipher need to be implemented as well.)

  • --master-user=user_name

    For a replication slave, the username of the account it uses for connecting to the master server. If no username is given, the default is test. This option was introduced in MySQL 3.23.15.

  • --max-binlog-dump-events=n

    This option is used by mysql-test-run for replication testing. This option was introduced in MySQL 3.23.40.

  • --old-rpl-compat (boolean)

    Tells the server to use the old replication binary update log format for LOAD DATA statements that does not store the data in the log. This option was introduced in MySQL 4.0.0.

  • --reckless-slave

    This option is used for replication debugging. This option was introduced in MySQL 4.0.2.

  • --relay-log=file_name

    For a replication slave, the name of the relay log. (In MySQL 4, the slave I/O thread stores updates read from the master in the relay log, and the SQL thread reads the relay log for queries and updates them.) The default relay log name is HOSTNAME-relay-bin.nnn in the data directory, where HOSTNAME is the name of the server host and nnn is a sequence of numbers incremented by one each time a new log is created. This option was introduced in MySQL 4.0.2.

  • --relay-log-index=file_name

    For a replication slave, the name of the relay log index file. The default name is HOSTNAME-relay-bin.index in the data directory, where HOSTNAME is the name of the server host. This option was introduced in MySQL 4.0.2.

  • --relay-log-info-file=file_name

    For a replication slave, the name of the relay log information file. The default name is relay-log.info in the data directory. This option was introduced in MySQL 4.0.2.

  • --replicate-do-db=db_name

    For a replication slave, replicate only the named database. To restrict replication to a set of databases, repeat the option once for each database name. This option was introduced in MySQL 3.23.16.

  • --replicate-do-table=db_name.tbl_name

    For a replication slave, replicate only the named table. To restrict replication to a set of tables, repeat the option once for each table name. This option was introduced in MySQL 3.23.28.

  • --replicate-ignore-db=db_name

    For a replication slave, do not replicate the named database. To ignore multiple databases, repeat the option once for each database name. This option was introduced in MySQL 3.23.16.

  • --replicate-ignore-table=tbl_name

    For a replication slave, do not replicate the named table. To ignore multiple tables, repeat the option once for each table name. This option was introduced in MySQL 3.23.28.

  • --replicate-rewrite-db=master_db->slave_db

    This option tells a replication slave to treat one database as another. Updates made to the original database master_db on the master server are replicated as updates to the database slave_db on the slave server. This option was introduced in MySQL 3.23.26. When given on the command line, the option value should be enclosed within quotes to prevent the command interpreter from treating the '>' character as an output redirection operator.

  • --replicate-wild-do-table=pattern

    For a replication slave, replicate only tables with names that match the given pattern. To restrict replication to a set of patterns, repeat the option once for each pattern. This option was introduced in MySQL 3.23.28.

  • --replicate-wild-ignore-table=pattern

    For a replication slave, do not replicate tables with names that match the given pattern. To ignore multiple patterns, repeat the option once for each pattern. This option was introduced in MySQL 3.23.28.

  • --server-id=n

    The replication server ID value. The value must be unique among communicating replication servers. This option was introduced in MySQL 3.23.26.

  • --show-slave-auth-info (boolean)

    Display the slave server username and password in the output of the SHOW SLAVE STATUS statement. This option was introduced in MySQL 4.0.0.

  • --skip-slave-start

    Do not start the slave automatically. It must be started manually by issuing a SLAVE START statement. This option was introduced in MySQL 3.23.26.

  • --slave-load-tmpdir=dir_name

    The pathname to the directory used by a slave server for processing LOAD DATA statements. This option was introduced in MySQL 4.0.0.

  • --slave-skip-errors=error_list

    The list of errors that a slave server should ignore rather than suspending replication if they occur. A value of all means all errors should be ignored, which is essentially the behavior obtained by using the --reckless-slave option. Otherwise, the value should be a list of one or more error numbers separated by commas. This option was introduced in MySQL 3.23.47.

  • --sporadic-binlog-dump-fail (boolean)

    This option is used by mysql-test-run for replication testing. This option was introduced in MySQL 3.23.40.

Variables for mysqld

To see what values mysqld will use by default, use the following command:

 % mysqld --help  

To see what values the currently executing mysqld is using, use this command:

 % mysqladmin variables  

You can also check the current variable values by issuing a SHOW VARIABLES statement. The variables shown by that statement are described in the entry for SHOW in Appendix D. Any mysqld variable can be set at startup time using the instructions in the "Setting Program Variables" section earlier in this appendix. In addition, as of MySQL 4.0.3, several variables can be modified dynamically; for more information, see the entry for the SET statement in Appendix D.



MySQL
High Performance MySQL: Optimization, Backups, Replication, and More
ISBN: 0596101716
EAN: 2147483647
Year: 2003
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net