{
    "mode": "info",
    "parameter": "mysqldump",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/mysqldump/json",
    "generated": "2026-07-05T11:41:01Z",
    "synopsis": "mysqldump [options] [dbname [tblname ...]]",
    "sections": {
        "NAME": {
            "content": "mysqldump - a database backup program\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "mysqldump [options] [dbname [tblname ...]]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The mysqldump client utility performs logical backups, producing a set\nof SQL statements that can be executed to reproduce the original\ndatabase object definitions and table data. It dumps one or more MySQL\ndatabases for backup or transfer to another SQL server. The mysqldump\ncommand can also generate output in CSV, other delimited text, or XML\nformat.\n\nTip\nConsider using the MySQL Shell dump utilities[1], which provide\nparallel dumping with multiple threads, file compression, and\nprogress information display, as well as cloud features such as\nOracle Cloud Infrastructure Object Storage streaming, and MySQL\nHeatWave Service compatibility checks and modifications. Dumps can\nbe easily imported into a MySQL Server instance or a MySQL HeatWave\nService DB System using the MySQL Shell load dump utilities[2].\nInstallation instructions for MySQL Shell can be found here[3].\n\no   Performance and Scalability Considerations\n\no   Invocation Syntax\n\no   Option Syntax - Alphabetical Summary\n\no   Connection Options\n\no   Option-File Options\n\no   DDL Options\n\no   Debug Options\n\no   Help Options\n\no   Internationalization Options\n\no   Replication Options\n\no   Format Options\n\no   Filtering Options\n\no   Performance Options\n\no   Transactional Options\n\no   Option Groups\n\no   Examples\n\no   Restrictions\n\nmysqldump requires at least the SELECT privilege for dumped tables,\nSHOW VIEW for dumped views, TRIGGER for dumped triggers, LOCK TABLES if\nthe --single-transaction option is not used, PROCESS (as of MySQL\n8.0.21) if the --no-tablespaces option is not used, and (as of MySQL\n8.0.32) the RELOAD or FLUSHTABLES privilege with --single-transaction\nif both gtidmode=ON and gtidpurged=ON|AUTO. Certain options might\nrequire other privileges as noted in the option descriptions.\n\nTo reload a dump file, you must have the privileges required to execute\nthe statements that it contains, such as the appropriate CREATE\nprivileges for objects created by those statements.\n\nmysqldump output can include ALTER DATABASE statements that change the\ndatabase collation. These may be used when dumping stored programs to\npreserve their character encodings. To reload a dump file containing\nsuch statements, the ALTER privilege for the affected database is\nrequired.\n\nNote\nA dump made using PowerShell on Windows with output redirection\ncreates a file that has UTF-16 encoding:\n\nmysqldump [options] > dump.sql\n\nHowever, UTF-16 is not permitted as a connection character set (see\nthe section called \"Impermissible Client Character Sets\"), so the\ndump file cannot be loaded correctly. To work around this issue,\nuse the --result-file option, which creates the output in ASCII\nformat:\n\nmysqldump [options] --result-file=dump.sql\n\nIt is not recommended to load a dump file when GTIDs are enabled on the\nserver (gtidmode=ON), if your dump file includes system tables.\nmysqldump issues DML instructions for the system tables which use the\nnon-transactional MyISAM storage engine, and this combination is not\npermitted when GTIDs are enabled.  Performance and Scalability\nConsiderations\n\nmysqldump advantages include the convenience and flexibility of viewing\nor even editing the output before restoring. You can clone databases\nfor development and DBA work, or produce slight variations of an\nexisting database for testing. It is not intended as a fast or scalable\nsolution for backing up substantial amounts of data. With large data\nsizes, even if the backup step takes a reasonable time, restoring the\ndata can be very slow because replaying the SQL statements involves\ndisk I/O for insertion, index creation, and so on.\n\nFor large-scale backup and restore, a physical backup is more\nappropriate, to copy the data files in their original format so that\nthey can be restored quickly.\n\nIf your tables are primarily InnoDB tables, or if you have a mix of\nInnoDB and MyISAM tables, consider using mysqlbackup, which is\navailable as part of MySQL Enterprise. This tool provides high\nperformance for InnoDB backups with minimal disruption; it can also\nback up tables from MyISAM and other storage engines; it also provides\na number of convenient options to accommodate different backup\nscenarios. See Section 32.1, \"MySQL Enterprise Backup Overview\".\n\nmysqldump can retrieve and dump table contents row by row, or it can\nretrieve the entire content from a table and buffer it in memory before\ndumping it. Buffering in memory can be a problem if you are dumping\nlarge tables. To dump tables row by row, use the --quick option (or\n--opt, which enables --quick). The --opt option (and hence --quick) is\nenabled by default, so to enable memory buffering, use --skip-quick.\n\nIf you are using a recent version of mysqldump to generate a dump to be\nreloaded into a very old MySQL server, use the --skip-opt option\ninstead of the --opt or --extended-insert option.\n\nFor additional information about mysqldump, see Section 9.4, \"Using\nmysqldump for Backups\".  Invocation Syntax\n\nThere are in general three ways to use mysqldump--in order to dump a\nset of one or more tables, a set of one or more complete databases, or\nan entire MySQL server--as shown here:\n\nmysqldump [options] dbname [tblname ...]\nmysqldump [options] --databases dbname ...\nmysqldump [options] --all-databases\n\nTo dump entire databases, do not name any tables following dbname, or\nuse the --databases or --all-databases option.\n\nTo see a list of the options your version of mysqldump supports, issue\nthe command mysqldump --help.  Option Syntax - Alphabetical Summary\n\nmysqldump supports the following options, which can be specified on the\ncommand line or in the [mysqldump] and [client] groups of an option\nfile. For information about option files used by MySQL programs, see\nSection 6.2.2.2, \"Using Option Files\".  Connection Options\n\nThe mysqldump command logs into a MySQL server to extract information.\nThe following options specify how to connect to the MySQL server,\neither on the same machine or a remote system.\n\no   --bind-address=ipaddress\n\n+--------------------+---------------------------+\n|Command-Line Format | --bind-address=ipaddress |\n+--------------------+---------------------------+\nOn a computer having multiple network interfaces, use this option\nto select which interface to use for connecting to the MySQL\nserver.\n\no   --compress, -C\n\n+--------------------+-----------------------+\n|Command-Line Format | --compress[={OFF|ON}] |\n+--------------------+-----------------------+\n|Deprecated          | 8.0.18                |\n+--------------------+-----------------------+\n|Type                | Boolean               |\n+--------------------+-----------------------+\n|Default Value       | OFF                   |\n+--------------------+-----------------------+\nCompress all information sent between the client and the server if\npossible. See Section 6.2.8, \"Connection Compression Control\".\n\nAs of MySQL 8.0.18, this option is deprecated. Expect it to be\nremoved in a future version of MySQL. See the section called\n\"Configuring Legacy Connection Compression\".\n\no   --compression-algorithms=value\n\n+--------------------+-------------------------+\n|Command-Line Format | --compression-          |\n|                    | algorithms=value        |\n+--------------------+-------------------------+\n|Introduced          | 8.0.18                  |\n+--------------------+-------------------------+\n|Type                | Set                     |\n+--------------------+-------------------------+\n|Default Value       | uncompressed            |\n+--------------------+-------------------------+\n|Valid Values        |                         |\n|                    |            zlib         |\n|                    |                         |\n|                    |            zstd         |\n|                    |                         |\n|                    |            uncompressed |\n+--------------------+-------------------------+\nThe permitted compression algorithms for connections to the server.\nThe available algorithms are the same as for the\nprotocolcompressionalgorithms system variable. The default value\nis uncompressed.\n\nFor more information, see Section 6.2.8, \"Connection Compression\nControl\".\n\nThis option was added in MySQL 8.0.18.\n\no   --default-auth=plugin\n\n+--------------------+-----------------------+\n|Command-Line Format | --default-auth=plugin |\n+--------------------+-----------------------+\n|Type                | String                |\n+--------------------+-----------------------+\nA hint about which client-side authentication plugin to use. See\nSection 8.2.17, \"Pluggable Authentication\".\n\no   --enable-cleartext-plugin\n\n+--------------------+---------------------------+\n|Command-Line Format | --enable-cleartext-plugin |\n+--------------------+---------------------------+\n|Type                | Boolean                   |\n+--------------------+---------------------------+\n|Default Value       | FALSE                     |\n+--------------------+---------------------------+\nEnable the mysqlclearpassword cleartext authentication plugin.\n(See Section 8.4.1.4, \"Client-Side Cleartext Pluggable\nAuthentication\".)\n\no   --get-server-public-key\n\n+--------------------+-------------------------+\n|Command-Line Format | --get-server-public-key |\n+--------------------+-------------------------+\n|Type                | Boolean                 |\n+--------------------+-------------------------+\nRequest from the server the public key required for RSA key\npair-based password exchange. This option applies to clients that\nauthenticate with the cachingsha2password authentication plugin.\nFor that plugin, the server does not send the public key unless\nrequested. This option is ignored for accounts that do not\nauthenticate with that plugin. It is also ignored if RSA-based\npassword exchange is not used, as is the case when the client\nconnects to the server using a secure connection.\n\nIf --server-public-key-path=filename is given and specifies a\nvalid public key file, it takes precedence over\n--get-server-public-key.\n\nFor information about the cachingsha2password plugin, see\nSection 8.4.1.2, \"Caching SHA-2 Pluggable Authentication\".\n\no   --host=hostname, -h hostname\n\n+--------------------+--------+\n|Command-Line Format | --host |\n+--------------------+--------+\nDump data from the MySQL server on the given host. The default host\nis localhost.\n\no   --login-path=name\n\n+--------------------+-------------------+\n|Command-Line Format | --login-path=name |\n+--------------------+-------------------+\n|Type                | String            |\n+--------------------+-------------------+\nRead options from the named login path in the .mylogin.cnf login\npath file. A \"login path\" is an option group containing options\nthat specify which MySQL server to connect to and which account to\nauthenticate as. To create or modify a login path file, use the\nmysqlconfigeditor utility. See mysqlconfigeditor(1).\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\n\no   --password[=password], -p[password]\n\n+--------------------+-----------------------+\n|Command-Line Format | --password[=password] |\n+--------------------+-----------------------+\n|Type                | String                |\n+--------------------+-----------------------+\nThe password of the MySQL account used for connecting to the\nserver. The password value is optional. If not given, mysqldump\nprompts for one. If given, there must be no space between\n--password= or -p and the password following it. If no password\noption is specified, the default is to send no password.\n\nSpecifying a password on the command line should be considered\ninsecure. To avoid giving the password on the command line, use an\noption file. See Section 8.1.2.1, \"End-User Guidelines for Password\nSecurity\".\n\nTo explicitly specify that there is no password and that mysqldump\nshould not prompt for one, use the --skip-password option.\n\no   --password1[=passval] The password for multifactor authentication\nfactor 1 of the MySQL account used for connecting to the server.\nThe password value is optional. If not given, mysqldump prompts for\none. If given, there must be no space between --password1= and the\npassword following it. If no password option is specified, the\ndefault is to send no password.\n\nSpecifying a password on the command line should be considered\ninsecure. To avoid giving the password on the command line, use an\noption file. See Section 8.1.2.1, \"End-User Guidelines for Password\nSecurity\".\n\nTo explicitly specify that there is no password and that mysqldump\nshould not prompt for one, use the --skip-password1 option.\n\n--password1 and --password are synonymous, as are --skip-password1\nand --skip-password.\n\no   --password2[=passval] The password for multifactor authentication\nfactor 2 of the MySQL account used for connecting to the server.\nThe semantics of this option are similar to the semantics for\n--password1; see the description of that option for details.\n\no   --password3[=passval] The password for multifactor authentication\nfactor 3 of the MySQL account used for connecting to the server.\nThe semantics of this option are similar to the semantics for\n--password1; see the description of that option for details.\n\no   --pipe, -W\n\n+--------------------+--------+\n|Command-Line Format | --pipe |\n+--------------------+--------+\n|Type                | String |\n+--------------------+--------+\nOn Windows, connect to the server using a named pipe. This option\napplies only if the server was started with the namedpipe system\nvariable enabled to support named-pipe connections. In addition,\nthe user making the connection must be a member of the Windows\ngroup specified by the namedpipefullaccessgroup system\nvariable.\n\no   --plugin-authentication-kerberos-client-mode=value\n\n+--------------------+--------------------------+\n|Command-Line Format | --plugin-authentication- |\n|                    | kerberos-client-mode     |\n+--------------------+--------------------------+\n|Introduced          | 8.0.32                   |\n+--------------------+--------------------------+\n|Type                | String                   |\n+--------------------+--------------------------+\n|Default Value       | SSPI                     |\n+--------------------+--------------------------+\n|Valid Values        | GSSAPI                   |\n+--------------------+--------------------------+\nOn Windows, the authenticationkerberosclient authentication\nplugin supports this plugin option. It provides two possible values\nthat the client user can set at runtime: SSPI and GSSAPI.\n\nThe default value for the client-side plugin option uses Security\nSupport Provider Interface (SSPI), which is capable of acquiring\ncredentials from the Windows in-memory cache. Alternatively, the\nclient user can select a mode that supports Generic Security\nService Application Program Interface (GSSAPI) through the MIT\nKerberos library on Windows. GSSAPI is capable of acquiring cached\ncredentials previously generated by using the kinit command.\n\nFor more information, see Commands for Windows Clients in GSSAPI\nMode.\n\no   --plugin-dir=dirname\n\n+--------------------+-----------------------+\n|Command-Line Format | --plugin-dir=dirname |\n+--------------------+-----------------------+\n|Type                | Directory name        |\n+--------------------+-----------------------+\nThe directory in which to look for plugins. Specify this option if\nthe --default-auth option is used to specify an authentication\nplugin but mysqldump does not find it. See Section 8.2.17,\n\"Pluggable Authentication\".\n\no   --port=portnum, -P portnum\n\n+--------------------+-----------------+\n|Command-Line Format | --port=portnum |\n+--------------------+-----------------+\n|Type                | Numeric         |\n+--------------------+-----------------+\n|Default Value       | 3306            |\n+--------------------+-----------------+\nFor TCP/IP connections, the port number to use.\n\no   --protocol={TCP|SOCKET|PIPE|MEMORY}\n\n+--------------------+-------------------+\n|Command-Line Format | --protocol=type   |\n+--------------------+-------------------+\n|Type                | String            |\n+--------------------+-------------------+\n|Default Value       | [see text]        |\n+--------------------+-------------------+\n|Valid Values        |                   |\n|                    |            TCP    |\n|                    |                   |\n|                    |            SOCKET |\n|                    |                   |\n|                    |            PIPE   |\n|                    |                   |\n|                    |            MEMORY |\n+--------------------+-------------------+\nThe transport protocol to use for connecting to the server. It is\nuseful when the other connection parameters normally result in use\nof a protocol other than the one you want. For details on the\npermissible values, see Section 6.2.7, \"Connection Transport\nProtocols\".\n\no   --server-public-key-path=filename\n\n+--------------------+----------------------+\n|Command-Line Format | --server-public-key- |\n|                    | path=filename       |\n+--------------------+----------------------+\n|Type                | File name            |\n+--------------------+----------------------+\nThe path name to a file in PEM format containing a client-side copy\nof the public key required by the server for RSA key pair-based\npassword exchange. This option applies to clients that authenticate\nwith the sha256password or cachingsha2password authentication\nplugin. This option is ignored for accounts that do not\nauthenticate with one of those plugins. It is also ignored if\nRSA-based password exchange is not used, as is the case when the\nclient connects to the server using a secure connection.\n\nIf --server-public-key-path=filename is given and specifies a\nvalid public key file, it takes precedence over\n--get-server-public-key.\n\nFor sha256password, this option applies only if MySQL was built\nusing OpenSSL.\n\nFor information about the sha256password and cachingsha2password\nplugins, see Section 8.4.1.3, \"SHA-256 Pluggable Authentication\",\nand Section 8.4.1.2, \"Caching SHA-2 Pluggable Authentication\".\n\no   --socket=path, -S path\n\n+--------------------+--------------------------------+\n|Command-Line Format | --socket={filename|pipename} |\n+--------------------+--------------------------------+\n|Type                | String                         |\n+--------------------+--------------------------------+\nFor connections to localhost, the Unix socket file to use, or, on\nWindows, the name of the named pipe to use.\n\nOn Windows, this option applies only if the server was started with\nthe namedpipe system variable enabled to support named-pipe\nconnections. In addition, the user making the connection must be a\nmember of the Windows group specified by the\nnamedpipefullaccessgroup system variable.\n\no   --ssl* Options that begin with --ssl specify whether to connect to\nthe server using encryption and indicate where to find SSL keys and\ncertificates. See the section called \"Command Options for Encrypted\nConnections\".\n\no   --ssl-fips-mode={OFF|ON|STRICT}\n\n+--------------------+----------------------+\n|Command-Line Format | --ssl-fips-          |\n|                    | mode={OFF|ON|STRICT} |\n+--------------------+----------------------+\n|Deprecated          | 8.0.34               |\n+--------------------+----------------------+\n|Type                | Enumeration          |\n+--------------------+----------------------+\n|Default Value       | OFF                  |\n+--------------------+----------------------+\n|Valid Values        |                      |\n|                    |            OFF       |\n|                    |                      |\n|                    |            ON        |\n|                    |                      |\n|                    |            STRICT    |\n+--------------------+----------------------+\nControls whether to enable FIPS mode on the client side. The\n--ssl-fips-mode option differs from other --ssl-xxx options in that\nit is not used to establish encrypted connections, but rather to\naffect which cryptographic operations to permit. See Section 8.8,\n\"FIPS Support\".\n\nThese --ssl-fips-mode values are permitted:\n\no   OFF: Disable FIPS mode.\n\no   ON: Enable FIPS mode.\n\no   STRICT: Enable \"strict\" FIPS mode.\n\nNote\nIf the OpenSSL FIPS Object Module is not available, the only\npermitted value for --ssl-fips-mode is OFF. In this case,\nsetting --ssl-fips-mode to ON or STRICT causes the client to\nproduce a warning at startup and to operate in non-FIPS mode.\nAs of MySQL 8.0.34, this option is deprecated. Expect it to be\nremoved in a future version of MySQL.\n\no   --tls-ciphersuites=ciphersuitelist\n\n+--------------------+-------------------------------+\n|Command-Line Format | --tls-                        |\n|                    | ciphersuites=ciphersuitelist |\n+--------------------+-------------------------------+\n|Introduced          | 8.0.16                        |\n+--------------------+-------------------------------+\n|Type                | String                        |\n+--------------------+-------------------------------+\nThe permissible ciphersuites for encrypted connections that use\nTLSv1.3. The value is a list of one or more colon-separated\nciphersuite names. The ciphersuites that can be named for this\noption depend on the SSL library used to compile MySQL. For\ndetails, see Section 8.3.2, \"Encrypted Connection TLS Protocols and\nCiphers\".\n\nThis option was added in MySQL 8.0.16.\n\no   --tls-version=protocollist\n\n+--------------------------+------------------------------------------+\n|Command-Line Format       | --tls-                                   |\n|                          | version=protocollist                    |\n+--------------------------+------------------------------------------+\n|Type                      | String                                   |\n+--------------------------+------------------------------------------+\n|Default Value (>= 8.0.16) |                                          |\n|                          |            TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |\n|                          |            (OpenSSL 1.1.1                |\n|                          |            or higher)                    |\n|                          |                                          |\n|                          |            TLSv1,TLSv1.1,TLSv1.2         |\n|                          |            (otherwise)                   |\n+--------------------------+------------------------------------------+\n|Default Value (<= 8.0.15) | TLSv1,TLSv1.1,TLSv1.2                    |\n+--------------------------+------------------------------------------+\nThe permissible TLS protocols for encrypted connections. The value\nis a list of one or more comma-separated protocol names. The\nprotocols that can be named for this option depend on the SSL\nlibrary used to compile MySQL. For details, see Section 8.3.2,\n\"Encrypted Connection TLS Protocols and Ciphers\".\n\no   --user=username, -u username\n\n+--------------------+------------------+\n|Command-Line Format | --user=username |\n+--------------------+------------------+\n|Type                | String           |\n+--------------------+------------------+\nThe user name of the MySQL account to use for connecting to the\nserver.\n\nIf you are using the Rewriter plugin with MySQL 8.0.31 or later,\nyou should grant this user the SKIPQUERYREWRITE privilege.\n\no   --zstd-compression-level=level\n\n+--------------------+----------------------------+\n|Command-Line Format | --zstd-compression-level=# |\n+--------------------+----------------------------+\n|Introduced          | 8.0.18                     |\n+--------------------+----------------------------+\n|Type                | Integer                    |\n+--------------------+----------------------------+\nThe compression level to use for connections to the server that use\nthe zstd compression algorithm. The permitted levels are from 1 to\n22, with larger values indicating increasing levels of compression.\nThe default zstd compression level is 3. The compression level\nsetting has no effect on connections that do not use zstd\ncompression.\n\nFor more information, see Section 6.2.8, \"Connection Compression\nControl\".\n\nThis option was added in MySQL 8.0.18.\nOption-File Options\n\nThese options are used to control which option files to read.\n\no   --defaults-extra-file=filename\n\n+--------------------+-------------------+\n|Command-Line Format | --defaults-extra- |\n|                    | file=filename    |\n+--------------------+-------------------+\n|Type                | File name         |\n+--------------------+-------------------+\nRead this option file after the global option file but (on Unix)\nbefore the user option file. If the file does not exist or is\notherwise inaccessible, an error occurs. If filename is not an\nabsolute path name, it is interpreted relative to the current\ndirectory.\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\n\no   --defaults-file=filename\n\n+--------------------+---------------------------+\n|Command-Line Format | --defaults-file=filename |\n+--------------------+---------------------------+\n|Type                | File name                 |\n+--------------------+---------------------------+\nUse only the given option file. If the file does not exist or is\notherwise inaccessible, an error occurs. If filename is not an\nabsolute path name, it is interpreted relative to the current\ndirectory.\n\nException: Even with --defaults-file, client programs read\n.mylogin.cnf.\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\n\no   --defaults-group-suffix=str\n\n+--------------------+-------------------+\n|Command-Line Format | --defaults-group- |\n|                    | suffix=str        |\n+--------------------+-------------------+\n|Type                | String            |\n+--------------------+-------------------+\nRead not only the usual option groups, but also groups with the\nusual names and a suffix of str. For example, mysqldump normally\nreads the [client] and [mysqldump] groups. If this option is given\nas --defaults-group-suffix=other, mysqldump also reads the\n[clientother] and [mysqldumpother] groups.\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\n\no   --no-defaults\n\n+--------------------+---------------+\n|Command-Line Format | --no-defaults |\n+--------------------+---------------+\nDo not read any option files. If program startup fails due to\nreading unknown options from an option file, --no-defaults can be\nused to prevent them from being read.\n\nThe exception is that the .mylogin.cnf file is read in all cases,\nif it exists. This permits passwords to be specified in a safer way\nthan on the command line even when --no-defaults is used. To create\n.mylogin.cnf, use the mysqlconfigeditor utility. See\nmysqlconfigeditor(1).\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\n\no   --print-defaults\n\n+--------------------+------------------+\n|Command-Line Format | --print-defaults |\n+--------------------+------------------+\nPrint the program name and all options that it gets from option\nfiles.\n\nFor additional information about this and other option-file\noptions, see Section 6.2.2.3, \"Command-Line Options that Affect\nOption-File Handling\".\nDDL Options\n\nUsage scenarios for mysqldump include setting up an entire new MySQL\ninstance (including database tables), and replacing data inside an\nexisting instance with existing databases and tables. The following\noptions let you specify which things to tear down and set up when\nrestoring a dump, by encoding various DDL statements within the dump\nfile.\n\no   --add-drop-database\n\n+--------------------+---------------------+\n|Command-Line Format | --add-drop-database |\n+--------------------+---------------------+\nWrite a DROP DATABASE statement before each CREATE DATABASE\nstatement. This option is typically used in conjunction with the\n--all-databases or --databases option because no CREATE DATABASE\nstatements are written unless one of those options is specified.\n\nNote\nIn MySQL 8.0, the mysql schema is considered a system schema\nthat cannot be dropped by end users. If --add-drop-database is\nused with --all-databases or with --databases where the list of\nschemas to be dumped includes mysql, the dump file contains a\nDROP DATABASE `mysql` statement that causes an error when the\ndump file is reloaded.\n\nInstead, to use --add-drop-database, use --databases with a\nlist of schemas to be dumped, where the list does not include\nmysql.\n\no   --add-drop-table\n\n+--------------------+------------------+\n|Command-Line Format | --add-drop-table |\n+--------------------+------------------+\nWrite a DROP TABLE statement before each CREATE TABLE statement.\n\no   --add-drop-trigger\n\n+--------------------+--------------------+\n|Command-Line Format | --add-drop-trigger |\n+--------------------+--------------------+\nWrite a DROP TRIGGER statement before each CREATE TRIGGER\nstatement.\n\no   --all-tablespaces, -Y\n\n+--------------------+-------------------+\n|Command-Line Format | --all-tablespaces |\n+--------------------+-------------------+\nAdds to a table dump all SQL statements needed to create any\ntablespaces used by an NDB table. This information is not otherwise\nincluded in the output from mysqldump. This option is currently\nrelevant only to NDB Cluster tables.\n\no   --no-create-db, -n\n\n+--------------------+----------------+\n|Command-Line Format | --no-create-db |\n+--------------------+----------------+\nSuppress the CREATE DATABASE statements that are otherwise included\nin the output if the --databases or --all-databases option is\ngiven.\n\no   --no-create-info, -t\n\n+--------------------+------------------+\n|Command-Line Format | --no-create-info |\n+--------------------+------------------+\nDo not write CREATE TABLE statements that create each dumped table.\n\nNote\nThis option does not exclude statements creating log file\ngroups or tablespaces from mysqldump output; however, you can\nuse the --no-tablespaces option for this purpose.\n\no   --no-tablespaces, -y\n\n+--------------------+------------------+\n|Command-Line Format | --no-tablespaces |\n+--------------------+------------------+\nThis option suppresses all CREATE LOGFILE GROUP and CREATE\nTABLESPACE statements in the output of mysqldump.\n\no   --replace\n\n+--------------------+-----------+\n|Command-Line Format | --replace |\n+--------------------+-----------+\nWrite REPLACE statements rather than INSERT statements.\nDebug Options\n\nThe following options print debugging information, encode debugging\ninformation in the dump file, or let the dump operation proceed\nregardless of potential problems.\n\no   --allow-keywords\n\n+--------------------+------------------+\n|Command-Line Format | --allow-keywords |\n+--------------------+------------------+\nPermit creation of column names that are keywords. This works by\nprefixing each column name with the table name.\n\no   --comments, -i\n\n+--------------------+------------+\n|Command-Line Format | --comments |\n+--------------------+------------+\nWrite additional information in the dump file such as program\nversion, server version, and host. This option is enabled by\ndefault. To suppress this additional information, use\n--skip-comments.\n\no   --debug[=debugoptions], -# [debugoptions]\n\n+--------------------+----------------------------+\n|Command-Line Format | --debug[=debugoptions]    |\n+--------------------+----------------------------+\n|Type                | String                     |\n+--------------------+----------------------------+\n|Default Value       | d:t:o,/tmp/mysqldump.trace |\n+--------------------+----------------------------+\nWrite a debugging log. A typical debugoptions string is\nd:t:o,filename. The default value is d:t:o,/tmp/mysqldump.trace.\n\nThis option is available only if MySQL was built using WITHDEBUG.\nMySQL release binaries provided by Oracle are not built using this\noption.\n\no   --debug-check\n\n+--------------------+---------------+\n|Command-Line Format | --debug-check |\n+--------------------+---------------+\n|Type                | Boolean       |\n+--------------------+---------------+\n|Default Value       | FALSE         |\n+--------------------+---------------+\nPrint some debugging information when the program exits.\n\nThis option is available only if MySQL was built using WITHDEBUG.\nMySQL release binaries provided by Oracle are not built using this\noption.\n\no   --debug-info\n\n+--------------------+--------------+\n|Command-Line Format | --debug-info |\n+--------------------+--------------+\n|Type                | Boolean      |\n+--------------------+--------------+\n|Default Value       | FALSE        |\n+--------------------+--------------+\nPrint debugging information and memory and CPU usage statistics\nwhen the program exits.\n\nThis option is available only if MySQL was built using WITHDEBUG.\nMySQL release binaries provided by Oracle are not built using this\noption.\n\no   --dump-date\n\n+--------------------+-------------+\n|Command-Line Format | --dump-date |\n+--------------------+-------------+\n|Type                | Boolean     |\n+--------------------+-------------+\n|Default Value       | TRUE        |\n+--------------------+-------------+\nIf the --comments option is given, mysqldump produces a comment at\nthe end of the dump of the following form:\n\n-- Dump completed on DATE\n\nHowever, the date causes dump files taken at different times to\nappear to be different, even if the data are otherwise identical.\n--dump-date and --skip-dump-date control whether the date is added\nto the comment. The default is --dump-date (include the date in the\ncomment).  --skip-dump-date suppresses date printing.\n\no   --force, -f\n\n+--------------------+---------+\n|Command-Line Format | --force |\n+--------------------+---------+\nIgnore all errors; continue even if an SQL error occurs during a\ntable dump.\n\nOne use for this option is to cause mysqldump to continue executing\neven when it encounters a view that has become invalid because the\ndefinition refers to a table that has been dropped. Without\n--force, mysqldump exits with an error message. With --force,\nmysqldump prints the error message, but it also writes an SQL\ncomment containing the view definition to the dump output and\ncontinues executing.\n\nIf the --ignore-error option is also given to ignore specific\nerrors, --force takes precedence.\n\no   --log-error=filename\n\n+--------------------+-----------------------+\n|Command-Line Format | --log-error=filename |\n+--------------------+-----------------------+\n|Type                | File name             |\n+--------------------+-----------------------+\nLog warnings and errors by appending them to the named file. The\ndefault is to do no logging.\n\no   --skip-comments\n\n+--------------------+-----------------+\n|Command-Line Format | --skip-comments |\n+--------------------+-----------------+\nSee the description for the --comments option.\n\no   --verbose, -v\n\n+--------------------+-----------+\n|Command-Line Format | --verbose |\n+--------------------+-----------+\nVerbose mode. Print more information about what the program does.\nHelp Options\n\nThe following options display information about the mysqldump command\nitself.\n\no   --help, -?\n\n+--------------------+--------+\n|Command-Line Format | --help |\n+--------------------+--------+\nDisplay a help message and exit.\n\no   --version, -V\n\n+--------------------+-----------+\n|Command-Line Format | --version |\n+--------------------+-----------+\nDisplay version information and exit.\nInternationalization Options\n\nThe following options change how the mysqldump command represents\ncharacter data with national language settings.\n\no   --character-sets-dir=dirname\n\n+--------------------+-------------------+\n|Command-Line Format | --character-sets- |\n|                    | dir=dirname      |\n+--------------------+-------------------+\n|Type                | Directory name    |\n+--------------------+-------------------+\nThe directory where character sets are installed. See\nSection 12.15, \"Character Set Configuration\".\n\no   --default-character-set=charsetname\n\n+--------------------+----------------------+\n|Command-Line Format | --default-character- |\n|                    | set=charsetname     |\n+--------------------+----------------------+\n|Type                | String               |\n+--------------------+----------------------+\n|Default Value       | utf8                 |\n+--------------------+----------------------+\nUse charsetname as the default character set. See Section 12.15,\n\"Character Set Configuration\". If no character set is specified,\nmysqldump uses utf8mb4.\n\no   --no-set-names, -N\n\n+--------------------+----------------+\n|Command-Line Format | --no-set-names |\n+--------------------+----------------+\n|Deprecated          | Yes            |\n+--------------------+----------------+\nTurns off the --set-charset setting, the same as specifying\n--skip-set-charset.\n\no   --set-charset\n\n+--------------------+------------------+\n|Command-Line Format | --set-charset    |\n+--------------------+------------------+\n|Disabled by         | skip-set-charset |\n+--------------------+------------------+\nWrite SET NAMES defaultcharacterset to the output. This option is\nenabled by default. To suppress the SET NAMES statement, use\n--skip-set-charset.\nReplication Options\n\nThe mysqldump command is frequently used to create an empty instance,\nor an instance including data, on a replica server in a replication\nconfiguration. The following options apply to dumping and restoring\ndata on replication source servers and replicas.\n\no   --apply-replica-statements\n\n+--------------------+----------------------------+\n|Command-Line Format | --apply-replica-statements |\n+--------------------+----------------------------+\n|Introduced          | 8.0.26                     |\n+--------------------+----------------------------+\n|Type                | Boolean                    |\n+--------------------+----------------------------+\n|Default Value       | FALSE                      |\n+--------------------+----------------------------+\nFrom MySQL 8.0.26, use --apply-replica-statements, and before MySQL\n8.0.26, use --apply-slave-statements. Both options have the same\neffect. For a replica dump produced with the --dump-replica or\n--dump-slave option, the options add a STOP REPLICA (or before\nMySQL 8.0.22, STOP SLAVE) statement before the statement with the\nbinary log coordinates, and a START REPLICA statement at the end of\nthe output.\n\no   --apply-slave-statements\n\n+--------------------+--------------------------+\n|Command-Line Format | --apply-slave-statements |\n+--------------------+--------------------------+\n|Deprecated          | 8.0.26                   |\n+--------------------+--------------------------+\n|Type                | Boolean                  |\n+--------------------+--------------------------+\n|Default Value       | FALSE                    |\n+--------------------+--------------------------+\nUse this option before MySQL 8.0.26 rather than\n--apply-replica-statements. Both options have the same effect.\n\no   --delete-source-logs\n\n+--------------------+----------------------+\n|Command-Line Format | --delete-source-logs |\n+--------------------+----------------------+\n|Introduced          | 8.0.26               |\n+--------------------+----------------------+\nFrom MySQL 8.0.26, use --delete-source-logs, and before MySQL\n8.0.26, use --delete-master-logs. Both options have the same\neffect. On a replication source server, the options delete the\nbinary logs by sending a PURGE BINARY LOGS statement to the server\nafter performing the dump operation. The options require the RELOAD\nprivilege as well as privileges sufficient to execute that\nstatement. The options automatically enable --source-data or\n--master-data.\n\no   --delete-master-logs\n\n+--------------------+----------------------+\n|Command-Line Format | --delete-master-logs |\n+--------------------+----------------------+\n|Deprecated          | 8.0.26               |\n+--------------------+----------------------+\nUse this option before MySQL 8.0.26 rather than\n--delete-source-logs. Both options have the same effect.\n\no   --dump-replica[=value]\n\n+--------------------+------------------------+\n|Command-Line Format | --dump-replica[=value] |\n+--------------------+------------------------+\n|Introduced          | 8.0.26                 |\n+--------------------+------------------------+\n|Type                | Numeric                |\n+--------------------+------------------------+\n|Default Value       | 1                      |\n+--------------------+------------------------+\n|Valid Values        |                        |\n|                    |            1           |\n|                    |                        |\n|                    |            2           |\n+--------------------+------------------------+\nFrom MySQL 8.0.26, use --dump-replica, and before MySQL 8.0.26, use\n--dump-slave. Both options have the same effect. The options are\nsimilar to --source-data, except that they are used to dump a\nreplica server to produce a dump file that can be used to set up\nanother server as a replica that has the same source as the dumped\nserver. The options cause the dump output to include a CHANGE\nREPLICATION SOURCE TO statement (from MySQL 8.0.23) or CHANGE\nMASTER TO statement (before MySQL 8.0.23) that indicates the binary\nlog coordinates (file name and position) of the dumped replica's\nsource. The CHANGE REPLICATION SOURCE TO statement reads the values\nof RelayMasterLogFile and ExecMasterLogPos from the SHOW\nREPLICA STATUS output and uses them for SOURCELOGFILE and\nSOURCELOGPOS respectively. These are the replication source\nserver coordinates from which the replica starts replicating.\n\nNote\nInconsistencies in the sequence of transactions from the relay\nlog which have been executed can cause the wrong position to be\nused. See Section 19.5.1.34, \"Replication and Transaction\nInconsistencies\" for more information.\n--dump-replica or --dump-slave causes the coordinates from the\nsource to be used rather than those of the dumped server, as is\ndone by the --source-data or --master-data option. In addition,\nspecifying this option causes the --source-data or --master-data\noption to be overridden, if used, and effectively ignored.\n\nWarning\n--dump-replica or --dump-slave should not be used if the server\nwhere the dump is going to be applied uses gtidmode=ON and\nSOURCEAUTOPOSITION=1 or MASTERAUTOPOSITION=1.\nThe option value is handled the same way as for --source-data.\nSetting no value or 1 causes a CHANGE REPLICATION SOURCE TO\nstatement (from MySQL 8.0.23) or CHANGE MASTER TO statement (before\nMySQL 8.0.23) to be written to the dump. Setting 2 causes the\nstatement to be written but encased in SQL comments. It has the\nsame effect as --source-data in terms of enabling or disabling\nother options and in how locking is handled.\n\n--dump-replica or --dump-slave causes mysqldump to stop the\nreplication SQL thread before the dump and restart it again after.\n\n--dump-replica or --dump-slave sends a SHOW REPLICA STATUS\nstatement to the server to obtain information, so they require\nprivileges sufficient to execute that statement.\n\n--apply-replica-statements and --include-source-host-port options\ncan be used in conjunction with --dump-replica or --dump-slave.\n\no   --dump-slave[=value]\n\n+--------------------+----------------------+\n|Command-Line Format | --dump-slave[=value] |\n+--------------------+----------------------+\n|Deprecated          | 8.0.26               |\n+--------------------+----------------------+\n|Type                | Numeric              |\n+--------------------+----------------------+\n|Default Value       | 1                    |\n+--------------------+----------------------+\n|Valid Values        |                      |\n|                    |            1         |\n|                    |                      |\n|                    |            2         |\n+--------------------+----------------------+\nUse this option before MySQL 8.0.26 rather than --dump-replica.\nBoth options have the same effect.\n\no   --include-source-host-port\n\n+--------------------+----------------------------+\n|Command-Line Format | --include-source-host-port |\n+--------------------+----------------------------+\n|Introduced          | 8.0.26                     |\n+--------------------+----------------------------+\n|Type                | Boolean                    |\n+--------------------+----------------------------+\n|Default Value       | FALSE                      |\n+--------------------+----------------------------+\nFrom MySQL 8.0.26, use --include-source-host-port, and before MySQL\n8.0.26, use --include-master-host-port. Both options have the same\neffect. The options add the SOURCEHOST | MASTERHOST and\nSOURCEPORT | MASTERPORT options for the host name and TCP/IP port\nnumber of the replica's source, to the CHANGE REPLICATION SOURCE TO\nstatement (from MySQL 8.0.23) or CHANGE MASTER TO statement (before\nMySQL 8.0.23) in a replica dump produced with the --dump-replica or\n--dump-slave option.\n\no   --include-master-host-port\n\n+--------------------+----------------------------+\n|Command-Line Format | --include-master-host-port |\n+--------------------+----------------------------+\n|Deprecated          | 8.0.26                     |\n+--------------------+----------------------------+\n|Type                | Boolean                    |\n+--------------------+----------------------------+\n|Default Value       | FALSE                      |\n+--------------------+----------------------------+\nUse this option before MySQL 8.0.26 rather than\n--include-source-host-port. Both options have the same effect.\n\no   --source-data[=value]\n\n+--------------------+-----------------------+\n|Command-Line Format | --source-data[=value] |\n+--------------------+-----------------------+\n|Introduced          | 8.0.26                |\n+--------------------+-----------------------+\n|Type                | Numeric               |\n+--------------------+-----------------------+\n|Default Value       | 1                     |\n+--------------------+-----------------------+\n|Valid Values        |                       |\n|                    |            1          |\n|                    |                       |\n|                    |            2          |\n+--------------------+-----------------------+\nFrom MySQL 8.0.26, use --source-data, and before MySQL 8.0.26, use\n--master-data. Both options have the same effect. The options are\nused to dump a replication source server to produce a dump file\nthat can be used to set up another server as a replica of the\nsource. The options cause the dump output to include a CHANGE\nREPLICATION SOURCE TO statement (from MySQL 8.0.23) or CHANGE\nMASTER TO statement (before MySQL 8.0.23) that indicates the binary\nlog coordinates (file name and position) of the dumped server.\nThese are the replication source server coordinates from which the\nreplica should start replicating after you load the dump file into\nthe replica.\n\nIf the option value is 2, the CHANGE REPLICATION SOURCE TO | CHANGE\nMASTER TO statement is written as an SQL comment, and thus is\ninformative only; it has no effect when the dump file is reloaded.\nIf the option value is 1, the statement is not written as a comment\nand takes effect when the dump file is reloaded. If no option value\nis specified, the default value is 1.\n\n--source-data and --master-data send a SHOW MASTER STATUS statement\nto the server to obtain information, so they require privileges\nsufficient to execute that statement. This option also requires the\nRELOAD privilege and the binary log must be enabled.\n\n--source-data and --master-data automatically turn off\n--lock-tables. They also turn on --lock-all-tables, unless\n--single-transaction also is specified, in which case, a global\nread lock is acquired only for a short time at the beginning of the\ndump (see the description for --single-transaction). In all cases,\nany action on logs happens at the exact moment of the dump.\n\nIt is also possible to set up a replica by dumping an existing\nreplica of the source, using the --dump-replica or --dump-slave\noption, which overrides --source-data and --master-data and causes\nthem to be ignored.\n\no   --master-data[=value]\n\n+--------------------+-----------------------+\n|Command-Line Format | --master-data[=value] |\n+--------------------+-----------------------+\n|Deprecated          | 8.0.26                |\n+--------------------+-----------------------+\n|Type                | Numeric               |\n+--------------------+-----------------------+\n|Default Value       | 1                     |\n+--------------------+-----------------------+\n|Valid Values        |                       |\n|                    |            1          |\n|                    |                       |\n|                    |            2          |\n+--------------------+-----------------------+\nUse this option before MySQL 8.0.26 rather than --source-data. Both\noptions have the same effect.\n\no   --set-gtid-purged=value\n\n+--------------------+-------------------------+\n|Command-Line Format | --set-gtid-purged=value |\n+--------------------+-------------------------+\n|Type                | Enumeration             |\n+--------------------+-------------------------+\n|Default Value       | AUTO                    |\n+--------------------+-------------------------+\n|Valid Values        |                         |\n|                    |            OFF          |\n|                    |                         |\n|                    |            ON           |\n|                    |                         |\n|                    |            AUTO         |\n+--------------------+-------------------------+\nThis option is for servers that use GTID-based replication\n(gtidmode=ON). It controls the inclusion of a SET\n@@GLOBAL.gtidpurged statement in the dump output, which updates\nthe value of gtidpurged on a server where the dump file is\nreloaded, to add the GTID set from the source server's\ngtidexecuted system variable.  gtidpurged holds the GTIDs of all\ntransactions that have been applied on the server, but do not exist\non any binary log file on the server.  mysqldump therefore adds the\nGTIDs for the transactions that were executed on the source server,\nso that the target server records these transactions as applied,\nalthough it does not have them in its binary logs.\n--set-gtid-purged also controls the inclusion of a SET\n@@SESSION.sqllogbin=0 statement, which disables binary logging\nwhile the dump file is being reloaded. This statement prevents new\nGTIDs from being generated and assigned to the transactions in the\ndump file as they are executed, so that the original GTIDs for the\ntransactions are used.\n\nIf you do not set the --set-gtid-purged option, the default is that\na SET @@GLOBAL.gtidpurged statement is included in the dump output\nif GTIDs are enabled on the server you are backing up, and the set\nof GTIDs in the global value of the gtidexecuted system variable\nis not empty. A SET @@SESSION.sqllogbin=0 statement is also\nincluded if GTIDs are enabled on the server.\n\nYou can either replace the value of gtidpurged with a specified\nGTID set, or add a plus sign (+) to the statement to append a\nspecified GTID set to the GTID set that is already held by\ngtidpurged. The SET @@GLOBAL.gtidpurged statement recorded by\nmysqldump includes a plus sign (+) in a version-specific comment,\nsuch that MySQL adds the GTID set from the dump file to the\nexisting gtidpurged value.\n\nIt is important to note that the value that is included by\nmysqldump for the SET @@GLOBAL.gtidpurged statement includes the\nGTIDs of all transactions in the gtidexecuted set on the server,\neven those that changed suppressed parts of the database, or other\ndatabases on the server that were not included in a partial dump.\nThis can mean that after the gtidpurged value has been updated on\nthe server where the dump file is replayed, GTIDs are present that\ndo not relate to any data on the target server. If you do not\nreplay any further dump files on the target server, the extraneous\nGTIDs do not cause any problems with the future operation of the\nserver, but they make it harder to compare or reconcile GTID sets\non different servers in the replication topology. If you do replay\na further dump file on the target server that contains the same\nGTIDs (for example, another partial dump from the same origin\nserver), any SET @@GLOBAL.gtidpurged statement in the second dump\nfile fails. In this case, either remove the statement manually\nbefore replaying the dump file, or output the dump file without the\nstatement.\n\nBefore MySQL 8.0.32: Using this option with the\n--single-transaction option could lead to inconsistencies in the\noutput. If --set-gtid-purged=ON is required, it can be used with\n--lock-all-tables, but this can prevent parallel queries while\nmysqldump is being run.\n\nIf the SET @@GLOBAL.gtidpurged statement would not have the\ndesired result on your target server, you can exclude the statement\nfrom the output, or (from MySQL 8.0.17) include it but comment it\nout so that it is not actioned automatically. You can also include\nthe statement but manually edit it in the dump file to achieve the\ndesired result.\n\nThe possible values for the --set-gtid-purged option are as\nfollows:\n\nAUTO\nThe default value. If GTIDs are enabled on the server you are\nbacking up and gtidexecuted is not empty, SET\n@@GLOBAL.gtidpurged is added to the output, containing the\nGTID set from gtidexecuted. If GTIDs are enabled, SET\n@@SESSION.sqllogbin=0 is added to the output. If GTIDs are\nnot enabled on the server, the statements are not added to the\noutput.\n\nOFF\nSET @@GLOBAL.gtidpurged is not added to the output, and SET\n@@SESSION.sqllogbin=0 is not added to the output. For a\nserver where GTIDs are not in use, use this option or AUTO.\nOnly use this option for a server where GTIDs are in use if you\nare sure that the required GTID set is already present in\ngtidpurged on the target server and should not be changed, or\nif you plan to identify and add any missing GTIDs manually.\n\nON\nIf GTIDs are enabled on the server you are backing up, SET\n@@GLOBAL.gtidpurged is added to the output (unless\ngtidexecuted is empty), and SET @@SESSION.sqllogbin=0 is\nadded to the output. An error occurs if you set this option but\nGTIDs are not enabled on the server. For a server where GTIDs\nare in use, use this option or AUTO, unless you are sure that\nthe GTIDs in gtidexecuted are not needed on the target server.\n\nCOMMENTED\nAvailable from MySQL 8.0.17. If GTIDs are enabled on the server\nyou are backing up, SET @@GLOBAL.gtidpurged is added to the\noutput (unless gtidexecuted is empty), but it is commented\nout. This means that the value of gtidexecuted is available in\nthe output, but no action is taken automatically when the dump\nfile is reloaded.  SET @@SESSION.sqllogbin=0 is added to the\noutput, and it is not commented out. With COMMENTED, you can\ncontrol the use of the gtidexecuted set manually or through\nautomation. For example, you might prefer to do this if you are\nmigrating data to another server that already has different\nactive databases.\nFormat Options\n\nThe following options specify how to represent the entire dump file or\ncertain kinds of data in the dump file. They also control whether\ncertain optional information is written to the dump file.\n\no   --compact\n\n+--------------------+-----------+\n|Command-Line Format | --compact |\n+--------------------+-----------+\nProduce more compact output. This option enables the\n--skip-add-drop-table, --skip-add-locks, --skip-comments,\n--skip-disable-keys, and --skip-set-charset options.\n\no   --compatible=name\n\n+--------------------+------------------------------+\n|Command-Line Format | --compatible=name[,name,...] |\n+--------------------+------------------------------+\n|Type                | String                       |\n+--------------------+------------------------------+\n|Default Value       |                              |\n+--------------------+------------------------------+\n|Valid Values        |                              |\n|                    |            ansi              |\n|                    |                              |\n|                    |            mysql323          |\n|                    |                              |\n|                    |            mysql40           |\n|                    |                              |\n|                    |            postgresql        |\n|                    |                              |\n|                    |            oracle            |\n|                    |                              |\n|                    |            mssql             |\n|                    |                              |\n|                    |            db2               |\n|                    |                              |\n|                    |            maxdb             |\n|                    |                              |\n|                    |            nokeyoptions    |\n|                    |                              |\n|                    |            notableoptions  |\n|                    |                              |\n|                    |            nokeyoptions    |\n+--------------------+------------------------------+\nProduce output that is more compatible with other database systems\nor with older MySQL servers. The only permitted value for this\noption is ansi, which has the same meaning as the corresponding\noption for setting the server SQL mode. See Section 7.1.11, \"Server\nSQL Modes\".\n\no   --complete-insert, -c\n\n+--------------------+-------------------+\n|Command-Line Format | --complete-insert |\n+--------------------+-------------------+\nUse complete INSERT statements that include column names.\n\no   --create-options\n\n+--------------------+------------------+\n|Command-Line Format | --create-options |\n+--------------------+------------------+\nInclude all MySQL-specific table options in the CREATE TABLE\nstatements.\n\no   --fields-terminated-by=..., --fields-enclosed-by=...,\n--fields-optionally-enclosed-by=..., --fields-escaped-by=...\n\n+--------------------+----------------------+\n|Command-Line Format | --fields-terminated- |\n|                    | by=string            |\n+--------------------+----------------------+\n|Type                | String               |\n+--------------------+----------------------+\n\n+--------------------+--------------------+\n|Command-Line Format | --fields-enclosed- |\n|                    | by=string          |\n+--------------------+--------------------+\n|Type                | String             |\n+--------------------+--------------------+\n\n+--------------------+----------------------+\n|Command-Line Format | --fields-optionally- |\n|                    | enclosed-by=string   |\n+--------------------+----------------------+\n|Type                | String               |\n+--------------------+----------------------+\n\n+--------------------+---------------------+\n|Command-Line Format | --fields-escaped-by |\n+--------------------+---------------------+\n|Type                | String              |\n+--------------------+---------------------+\nThese options are used with the --tab option and have the same\nmeaning as the corresponding FIELDS clauses for LOAD DATA. See\nSection 15.2.9, \"LOAD DATA Statement\".\n\no   --hex-blob\n\n+--------------------+------------+\n|Command-Line Format | --hex-blob |\n+--------------------+------------+\nDump binary columns using hexadecimal notation (for example, 'abc'\nbecomes 0x616263). The affected data types are BINARY, VARBINARY,\nBLOB types, BIT, all spatial data types, and other non-binary data\ntypes when used with the binary character set.\n\nThe --hex-blob option is ignored when the --tab is used.\n\no   --lines-terminated-by=...\n\n+--------------------+---------------------+\n|Command-Line Format | --lines-terminated- |\n|                    | by=string           |\n+--------------------+---------------------+\n|Type                | String              |\n+--------------------+---------------------+\nThis option is used with the --tab option and has the same meaning\nas the corresponding LINES clause for LOAD DATA. See\nSection 15.2.9, \"LOAD DATA Statement\".\n\no   --quote-names, -Q\n\n+--------------------+------------------+\n|Command-Line Format | --quote-names    |\n+--------------------+------------------+\n|Disabled by         | skip-quote-names |\n+--------------------+------------------+\nQuote identifiers (such as database, table, and column names)\nwithin ` characters. If the ANSIQUOTES SQL mode is enabled,\nidentifiers are quoted within \" characters. This option is enabled\nby default. It can be disabled with --skip-quote-names, but this\noption should be given after any option such as --compatible that\nmay enable --quote-names.\n\no   --result-file=filename, -r filename\n\n+--------------------+-------------------------+\n|Command-Line Format | --result-file=filename |\n+--------------------+-------------------------+\n|Type                | File name               |\n+--------------------+-------------------------+\nDirect output to the named file. The result file is created and its\nprevious contents overwritten, even if an error occurs while\ngenerating the dump.\n\nThis option should be used on Windows to prevent newline \\n\ncharacters from being converted to \\r\\n carriage return/newline\nsequences.\n\no   --show-create-skip-secondary-engine=value\n\n+--------------------+---------------------+\n|Command-Line Format | --show-create-skip- |\n|                    | secondary-engine    |\n+--------------------+---------------------+\n|Introduced          | 8.0.18              |\n+--------------------+---------------------+\nExcludes the SECONDARY ENGINE clause from CREATE TABLE statements.\nIt does so by enabling the showcreatetableskipsecondaryengine\nsystem variable for the duration of the dump operation.\nAlternatively, you can enable the\nshowcreatetableskipsecondaryengine system variable prior to\nusing mysqldump.\n\nThis option was added in MySQL 8.0.18. Attempting a mysqldump\noperation with the --show-create-skip-secondary-engine option on a\nrelease prior to MySQL 8.0.18 that does not support the\nshowcreatetableskipsecondaryengine variable causes an error.\n\no   --tab=dirname, -T dirname\n\n+--------------------+----------------+\n|Command-Line Format | --tab=dirname |\n+--------------------+----------------+\n|Type                | Directory name |\n+--------------------+----------------+\nProduce tab-separated text-format data files. For each dumped\ntable, mysqldump creates a tblname.sql file that contains the\nCREATE TABLE statement that creates the table, and the server\nwrites a tblname.txt file that contains its data. The option value\nis the directory in which to write the files.\n\nNote\nThis option should be used only when mysqldump is run on the\nsame machine as the mysqld server. Because the server creates\n*.txt files in the directory that you specify, the directory\nmust be writable by the server and the MySQL account that you\nuse must have the FILE privilege. Because mysqldump creates\n*.sql in the same directory, it must be writable by your system\nlogin account.\nBy default, the .txt data files are formatted using tab characters\nbetween column values and a newline at the end of each line. The\nformat can be specified explicitly using the --fields-xxx and\n--lines-terminated-by options.\n\nColumn values are converted to the character set specified by the\n--default-character-set option.\n\no   --tz-utc\n\n+--------------------+-------------+\n|Command-Line Format | --tz-utc    |\n+--------------------+-------------+\n|Disabled by         | skip-tz-utc |\n+--------------------+-------------+\nThis option enables TIMESTAMP columns to be dumped and reloaded\nbetween servers in different time zones.  mysqldump sets its\nconnection time zone to UTC and adds SET TIMEZONE='+00:00' to the\ndump file. Without this option, TIMESTAMP columns are dumped and\nreloaded in the time zones local to the source and destination\nservers, which can cause the values to change if the servers are in\ndifferent time zones.  --tz-utc also protects against changes due\nto daylight saving time.  --tz-utc is enabled by default. To\ndisable it, use --skip-tz-utc.\n\no   --xml, -X\n\n+--------------------+-------+\n|Command-Line Format | --xml |\n+--------------------+-------+\nWrite dump output as well-formed XML.\n\nNULL, 'NULL', and Empty Values: For a column named columnname, the\nNULL value, an empty string, and the string value 'NULL' are\ndistinguished from one another in the output generated by this\noption as follows.\n\n+---------------------+--------------------------------------------+\n|Value:               | XML Representation:                        |\n+---------------------+--------------------------------------------+\n|NULL (unknown value) |                                            |\n|                     |            <field                          |\n|                     |            name=\"columnname\"              |\n|                     |            xsi:nil=\"true\"                  |\n|                     |            />                              |\n+---------------------+--------------------------------------------+\n|                     |                                            |\n|                     |            <field                          |\n|                     |            name=\"columnname\"></field>     |\n+---------------------+--------------------------------------------+\n|                     |                                            |\n|                     |            <field                          |\n|                     |            name=\"columnname\">NULL</field> |\n+---------------------+--------------------------------------------+\nThe output from the mysql client when run using the --xml option\nalso follows the preceding rules. (See the section called \"MYSQL\nCLIENT OPTIONS\".)\n\nXML output from mysqldump includes the XML namespace, as shown\nhere:\n\n$> mysqldump --xml -u root world City\n<?xml version=\"1.0\"?>\n<mysqldump xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n<database name=\"world\">\n<tablestructure name=\"City\">\n<field Field=\"ID\" Type=\"int(11)\" Null=\"NO\" Key=\"PRI\" Extra=\"autoincrement\" />\n<field Field=\"Name\" Type=\"char(35)\" Null=\"NO\" Key=\"\" Default=\"\" Extra=\"\" />\n<field Field=\"CountryCode\" Type=\"char(3)\" Null=\"NO\" Key=\"\" Default=\"\" Extra=\"\" />\n<field Field=\"District\" Type=\"char(20)\" Null=\"NO\" Key=\"\" Default=\"\" Extra=\"\" />\n<field Field=\"Population\" Type=\"int(11)\" Null=\"NO\" Key=\"\" Default=\"0\" Extra=\"\" />\n<key Table=\"City\" Nonunique=\"0\" Keyname=\"PRIMARY\" Seqinindex=\"1\" Columnname=\"ID\"\nCollation=\"A\" Cardinality=\"4079\" Null=\"\" Indextype=\"BTREE\" Comment=\"\" />\n<options Name=\"City\" Engine=\"MyISAM\" Version=\"10\" Rowformat=\"Fixed\" Rows=\"4079\"\nAvgrowlength=\"67\" Datalength=\"273293\" Maxdatalength=\"18858823439613951\"\nIndexlength=\"43008\" Datafree=\"0\" Autoincrement=\"4080\"\nCreatetime=\"2007-03-31 01:47:01\" Updatetime=\"2007-03-31 01:47:02\"\nCollation=\"latin1swedishci\" Createoptions=\"\" Comment=\"\" />\n</tablestructure>\n<tabledata name=\"City\">\n<row>\n<field name=\"ID\">1</field>\n<field name=\"Name\">Kabul</field>\n<field name=\"CountryCode\">AFG</field>\n<field name=\"District\">Kabol</field>\n<field name=\"Population\">1780000</field>\n</row>\n...\n<row>\n<field name=\"ID\">4079</field>\n<field name=\"Name\">Rafah</field>\n<field name=\"CountryCode\">PSE</field>\n<field name=\"District\">Rafah</field>\n<field name=\"Population\">92020</field>\n</row>\n</tabledata>\n</database>\n</mysqldump>\nFiltering Options\n\nThe following options control which kinds of schema objects are written\nto the dump file: by category, such as triggers or events; by name, for\nexample, choosing which databases and tables to dump; or even filtering\nrows from the table data using a WHERE clause.\n\no   --all-databases, -A\n\n+--------------------+-----------------+\n|Command-Line Format | --all-databases |\n+--------------------+-----------------+\nDump all tables in all databases. This is the same as using the\n--databases option and naming all the databases on the command\nline.\n\nNote\nSee the --add-drop-database description for information about\nan incompatibility of that option with --all-databases.\nPrior to MySQL 8.0, the --routines and --events options for\nmysqldump and mysqlpump were not required to include stored\nroutines and events when using the --all-databases option: The dump\nincluded the mysql system database, and therefore also the\nmysql.proc and mysql.event tables containing stored routine and\nevent definitions. As of MySQL 8.0, the mysql.event and mysql.proc\ntables are not used. Definitions for the corresponding objects are\nstored in data dictionary tables, but those tables are not dumped.\nTo include stored routines and events in a dump made using\n--all-databases, use the --routines and --events options\nexplicitly.\n\no   --databases, -B\n\n+--------------------+-------------+\n|Command-Line Format | --databases |\n+--------------------+-------------+\nDump several databases. Normally, mysqldump treats the first name\nargument on the command line as a database name and following names\nas table names. With this option, it treats all name arguments as\ndatabase names.  CREATE DATABASE and USE statements are included in\nthe output before each new database.\n\nThis option may be used to dump the performanceschema database,\nwhich normally is not dumped even with the --all-databases option.\n(Also use the --skip-lock-tables option.)\n\nNote\nSee the --add-drop-database description for information about\nan incompatibility of that option with --databases.\n\no   --events, -E\n\n+--------------------+----------+\n|Command-Line Format | --events |\n+--------------------+----------+\nInclude Event Scheduler events for the dumped databases in the\noutput. This option requires the EVENT privileges for those\ndatabases.\n\nThe output generated by using --events contains CREATE EVENT\nstatements to create the events.\n\no   --ignore-error=error[,error]...\n\n+--------------------+------------------------+\n|Command-Line Format | --ignore-              |\n|                    | error=error[,error]... |\n+--------------------+------------------------+\n|Type                | String                 |\n+--------------------+------------------------+\nIgnore the specified errors. The option value is a list of\ncomma-separated error numbers specifying the errors to ignore\nduring mysqldump execution. If the --force option is also given to\nignore all errors, --force takes precedence.\n\no   --ignore-table=dbname.tblname\n\n+--------------------+------------------------+\n|Command-Line Format | --ignore-              |\n|                    | table=dbname.tblname |\n+--------------------+------------------------+\n|Type                | String                 |\n+--------------------+------------------------+\nDo not dump the given table, which must be specified using both the\ndatabase and table names. To ignore multiple tables, use this\noption multiple times. This option also can be used to ignore\nviews.\n\no   --no-data, -d\n\n+--------------------+-----------+\n|Command-Line Format | --no-data |\n+--------------------+-----------+\nDo not write any table row information (that is, do not dump table\ncontents). This is useful if you want to dump only the CREATE TABLE\nstatement for the table (for example, to create an empty copy of\nthe table by loading the dump file).\n\no   --routines, -R\n\n+--------------------+------------+\n|Command-Line Format | --routines |\n+--------------------+------------+\nInclude stored routines (procedures and functions) for the dumped\ndatabases in the output. This option requires the global SELECT\nprivilege.\n\nThe output generated by using --routines contains CREATE PROCEDURE\nand CREATE FUNCTION statements to create the routines.\n\no   --skip-generated-invisible-primary-key\n\n+--------------------+-----------------------+\n|Command-Line Format | --skip-generated-     |\n|                    | invisible-primary-key |\n+--------------------+-----------------------+\n|Introduced          | 8.0.30                |\n+--------------------+-----------------------+\n|Type                | Boolean               |\n+--------------------+-----------------------+\n|Default Value       | FALSE                 |\n+--------------------+-----------------------+\nThis option is available beginning with MySQL 8.0.30, and causes\ngenerated invisible primary keys to be excluded from the output.\nFor more information, see Section 15.1.20.11, \"Generated Invisible\nPrimary Keys\".\n\no   --tables\n\n+--------------------+----------+\n|Command-Line Format | --tables |\n+--------------------+----------+\nOverride the --databases or -B option.  mysqldump regards all name\narguments following the option as table names.\n\no   --triggers\n\n+--------------------+---------------+\n|Command-Line Format | --triggers    |\n+--------------------+---------------+\n|Disabled by         | skip-triggers |\n+--------------------+---------------+\nInclude triggers for each dumped table in the output. This option\nis enabled by default; disable it with --skip-triggers.\n\nTo be able to dump a table's triggers, you must have the TRIGGER\nprivilege for the table.\n\nMultiple triggers are permitted.  mysqldump dumps triggers in\nactivation order so that when the dump file is reloaded, triggers\nare created in the same activation order. However, if a mysqldump\ndump file contains multiple triggers for a table that have the same\ntrigger event and action time, an error occurs for attempts to load\nthe dump file into an older server that does not support multiple\ntriggers. (For a workaround, see Downgrade Notes[4]; you can\nconvert triggers to be compatible with older servers.)\n\no   --where='wherecondition', -w 'wherecondition'\n\n+--------------------+---------------------------+\n|Command-Line Format | --where='wherecondition' |\n+--------------------+---------------------------+\nDump only rows selected by the given WHERE condition. Quotes around\nthe condition are mandatory if it contains spaces or other\ncharacters that are special to your command interpreter.\n\nExamples:\n\n--where=\"user='jimf'\"\n-w\"userid>1\"\n-w\"userid<1\"\nPerformance Options\n\nThe following options are the most relevant for the performance\nparticularly of the restore operations. For large data sets, restore\noperation (processing the INSERT statements in the dump file) is the\nmost time-consuming part. When it is urgent to restore data quickly,\nplan and test the performance of this stage in advance. For restore\ntimes measured in hours, you might prefer an alternative backup and\nrestore solution, such as MySQL Enterprise Backup for InnoDB-only and\nmixed-use databases.\n\nPerformance is also affected by the transactional options, primarily\nfor the dump operation.\n\no   --column-statistics\n\n+--------------------+---------------------+\n|Command-Line Format | --column-statistics |\n+--------------------+---------------------+\n|Type                | Boolean             |\n+--------------------+---------------------+\n|Default Value       | OFF                 |\n+--------------------+---------------------+\nAdd ANALYZE TABLE statements to the output to generate histogram\nstatistics for dumped tables when the dump file is reloaded. This\noption is disabled by default because histogram generation for\nlarge tables can take a long time.\n\no   --disable-keys, -K\n\n+--------------------+----------------+\n|Command-Line Format | --disable-keys |\n+--------------------+----------------+\nFor each table, surround the INSERT statements with /*!40000 ALTER\nTABLE tblname DISABLE KEYS */; and /*!40000 ALTER TABLE tblname\nENABLE KEYS */; statements. This makes loading the dump file faster\nbecause the indexes are created after all rows are inserted. This\noption is effective only for nonunique indexes of MyISAM tables.\n\no   --extended-insert, -e\n\n+--------------------+----------------------+\n|Command-Line Format | --extended-insert    |\n+--------------------+----------------------+\n|Disabled by         | skip-extended-insert |\n+--------------------+----------------------+\nWrite INSERT statements using multiple-row syntax that includes\nseveral VALUES lists. This results in a smaller dump file and\nspeeds up inserts when the file is reloaded.\n\no   --insert-ignore\n\n+--------------------+-----------------+\n|Command-Line Format | --insert-ignore |\n+--------------------+-----------------+\nWrite INSERT IGNORE statements rather than INSERT statements.\n\no   --max-allowed-packet=value\n\n+--------------------+----------------------------+\n|Command-Line Format | --max-allowed-packet=value |\n+--------------------+----------------------------+\n|Type                | Numeric                    |\n+--------------------+----------------------------+\n|Default Value       | 25165824                   |\n+--------------------+----------------------------+\nThe maximum size of the buffer for client/server communication. The\ndefault is 24MB, the maximum is 1GB.\n\nNote\nThe value of this option is specific to mysqldump and should\nnot be confused with the MySQL server's maxallowedpacket\nsystem variable; the server value cannot be exceeded by a\nsingle packet from mysqldump, regardless of any setting for the\nmysqldump option, even if the latter is larger.\n\no   --mysqld-long-query-time=value\n\n+--------------------+-----------------------+\n|Command-Line Format | --mysqld-long-query-  |\n|                    | time=value            |\n+--------------------+-----------------------+\n|Introduced          | 8.0.30                |\n+--------------------+-----------------------+\n|Type                | Numeric               |\n+--------------------+-----------------------+\n|Default Value       | Server global setting |\n+--------------------+-----------------------+\nSet the session value of the longquerytime system variable. Use\nthis option, which is available from MySQL 8.0.30, if you want to\nincrease the time allowed for queries from mysqldump before they\nare logged to the slow query log file.  mysqldump performs a full\ntable scan, which means its queries can often exceed a global\nlongquerytime setting that is useful for regular queries. The\ndefault global setting is 10 seconds.\n\nYou can use --mysqld-long-query-time to specify a session value\nfrom 0 (meaning that every query from mysqldump is logged to the\nslow query log) to 31536000, which is 365 days in seconds. For\nmysqldump's option, you can only specify whole seconds. When you do\nnot specify this option, the server's global setting applies to\nmysqldump's queries.\n\no   --net-buffer-length=value\n\n+--------------------+---------------------------+\n|Command-Line Format | --net-buffer-length=value |\n+--------------------+---------------------------+\n|Type                | Numeric                   |\n+--------------------+---------------------------+\n|Default Value       | 16384                     |\n+--------------------+---------------------------+\nThe initial size of the buffer for client/server communication.\nWhen creating multiple-row INSERT statements (as with the\n--extended-insert or --opt option), mysqldump creates rows up to\n--net-buffer-length bytes long. If you increase this variable,\nensure that the MySQL server netbufferlength system variable has\na value at least this large.\n\no   --network-timeout, -M\n\n+--------------------+---------------------------+\n|Command-Line Format | --network-timeout[={0|1}] |\n+--------------------+---------------------------+\n|Type                | Boolean                   |\n+--------------------+---------------------------+\n|Default Value       | TRUE                      |\n+--------------------+---------------------------+\nEnable large tables to be dumped by setting --max-allowed-packet to\nits maximum value and network read and write timeouts to a large\nvalue. This option is enabled by default. To disable it, use\n--skip-network-timeout.\n\no   --opt\n\n+--------------------+----------+\n|Command-Line Format | --opt    |\n+--------------------+----------+\n|Disabled by         | skip-opt |\n+--------------------+----------+\nThis option, enabled by default, is shorthand for the combination\nof --add-drop-table --add-locks --create-options --disable-keys\n--extended-insert --lock-tables --quick --set-charset. It gives a\nfast dump operation and produces a dump file that can be reloaded\ninto a MySQL server quickly.\n\nBecause the --opt option is enabled by default, you only specify\nits converse, the --skip-opt to turn off several default settings.\nSee the discussion of mysqldump option groups for information about\nselectively enabling or disabling a subset of the options affected\nby --opt.\n\no   --quick, -q\n\n+--------------------+------------+\n|Command-Line Format | --quick    |\n+--------------------+------------+\n|Disabled by         | skip-quick |\n+--------------------+------------+\nThis option is useful for dumping large tables. It forces mysqldump\nto retrieve rows for a table from the server a row at a time rather\nthan retrieving the entire row set and buffering it in memory\nbefore writing it out.\n\no   --skip-opt\n\n+--------------------+------------+\n|Command-Line Format | --skip-opt |\n+--------------------+------------+\nSee the description for the --opt option.\nTransactional Options\n\nThe following options trade off the performance of the dump operation,\nagainst the reliability and consistency of the exported data.\n\no   --add-locks\n\n+--------------------+-------------+\n|Command-Line Format | --add-locks |\n+--------------------+-------------+\nSurround each table dump with LOCK TABLES and UNLOCK TABLES\nstatements. This results in faster inserts when the dump file is\nreloaded. See Section 10.2.5.1, \"Optimizing INSERT Statements\".\n\no   --flush-logs, -F\n\n+--------------------+--------------+\n|Command-Line Format | --flush-logs |\n+--------------------+--------------+\nFlush the MySQL server log files before starting the dump. This\noption requires the RELOAD privilege. If you use this option in\ncombination with the --all-databases option, the logs are flushed\nfor each database dumped. The exception is when using\n--lock-all-tables, --source-data or --master-data, or\n--single-transaction. In these cases, the logs are flushed only\nonce, corresponding to the moment that all tables are locked by\nFLUSH TABLES WITH READ LOCK. If you want your dump and the log\nflush to happen at exactly the same moment, you should use\n--flush-logs together with --lock-all-tables, --source-data or\n--master-data, or --single-transaction.\n\no   --flush-privileges\n\n+--------------------+--------------------+\n|Command-Line Format | --flush-privileges |\n+--------------------+--------------------+\nAdd a FLUSH PRIVILEGES statement to the dump output after dumping\nthe mysql database. This option should be used any time the dump\ncontains the mysql database and any other database that depends on\nthe data in the mysql database for proper restoration.\n\nBecause the dump file contains a FLUSH PRIVILEGES statement,\nreloading the file requires privileges sufficient to execute that\nstatement.\n\nNote\nFor upgrades to MySQL 5.7 or higher from older versions, do not\nuse --flush-privileges. For upgrade instructions in this case,\nsee Section 3.5, \"Changes in MySQL 8.0\".\n\no   --lock-all-tables, -x\n\n+--------------------+-------------------+\n|Command-Line Format | --lock-all-tables |\n+--------------------+-------------------+\nLock all tables across all databases. This is achieved by acquiring\na global read lock for the duration of the whole dump. This option\nautomatically turns off --single-transaction and --lock-tables.\n\no   --lock-tables, -l\n\n+--------------------+---------------+\n|Command-Line Format | --lock-tables |\n+--------------------+---------------+\nFor each dumped database, lock all tables to be dumped before\ndumping them. The tables are locked with READ LOCAL to permit\nconcurrent inserts in the case of MyISAM tables. For transactional\ntables such as InnoDB, --single-transaction is a much better option\nthan --lock-tables because it does not need to lock the tables at\nall.\n\nBecause --lock-tables locks tables for each database separately,\nthis option does not guarantee that the tables in the dump file are\nlogically consistent between databases. Tables in different\ndatabases may be dumped in completely different states.\n\nSome options, such as --opt, automatically enable --lock-tables. If\nyou want to override this, use --skip-lock-tables at the end of the\noption list.\n\no   --no-autocommit\n\n+--------------------+-----------------+\n|Command-Line Format | --no-autocommit |\n+--------------------+-----------------+\nEnclose the INSERT statements for each dumped table within SET\nautocommit = 0 and COMMIT statements.\n\no   --order-by-primary\n\n+--------------------+--------------------+\n|Command-Line Format | --order-by-primary |\n+--------------------+--------------------+\nDump each table's rows sorted by its primary key, or by its first\nunique index, if such an index exists. This is useful when dumping\na MyISAM table to be loaded into an InnoDB table, but makes the\ndump operation take considerably longer.\n\no   --shared-memory-base-name=name\n\n+--------------------+-----------------------+\n|Command-Line Format | --shared-memory-base- |\n|                    | name=name             |\n+--------------------+-----------------------+\n|Platform Specific   | Windows               |\n+--------------------+-----------------------+\nOn Windows, the shared-memory name to use for connections made\nusing shared memory to a local server. The default value is MYSQL.\nThe shared-memory name is case-sensitive.\n\nThis option applies only if the server was started with the\nsharedmemory system variable enabled to support shared-memory\nconnections.\n\no   --single-transaction\n\n+--------------------+----------------------+\n|Command-Line Format | --single-transaction |\n+--------------------+----------------------+\nThis option sets the transaction isolation mode to REPEATABLE READ\nand sends a START TRANSACTION SQL statement to the server before\ndumping data. It is useful only with transactional tables such as\nInnoDB, because then it dumps the consistent state of the database\nat the time when START TRANSACTION was issued without blocking any\napplications.\n\nThe RELOAD or FLUSHTABLES privilege is required with\n--single-transaction if both gtidmode=ON and gtidpurged=ON|AUTO.\nThis requirement was added in MySQL 8.0.32.\n\nWhen using this option, you should keep in mind that only InnoDB\ntables are dumped in a consistent state. For example, any MyISAM or\nMEMORY tables dumped while using this option may still change\nstate.\n\nWhile a --single-transaction dump is in process, to ensure a valid\ndump file (correct table contents and binary log coordinates), no\nother connection should use the following statements: ALTER TABLE,\nCREATE TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE. A\nconsistent read is not isolated from those statements, so use of\nthem on a table to be dumped can cause the SELECT that is performed\nby mysqldump to retrieve the table contents to obtain incorrect\ncontents or fail.\n\nThe --single-transaction option and the --lock-tables option are\nmutually exclusive because LOCK TABLES causes any pending\ntransactions to be committed implicitly.\n\nBefore 8.0.32: Using --single-transaction together with the\n--set-gtid-purged option was not recommended; doing so could lead\nto inconsistencies in the output of mysqldump.\n\nTo dump large tables, combine the --single-transaction option with\nthe --quick option.\nOption Groups\n\no   The --opt option turns on several settings that work together to\nperform a fast dump operation. All of these settings are on by\ndefault, because --opt is on by default. Thus you rarely if ever\nspecify --opt. Instead, you can turn these settings off as a group\nby specifying --skip-opt, then optionally re-enable certain\nsettings by specifying the associated options later on the command\nline.\n\no   The --compact option turns off several settings that control\nwhether optional statements and comments appear in the output.\nAgain, you can follow this option with other options that re-enable\ncertain settings, or turn all the settings on by using the\n--skip-compact form.\n\nWhen you selectively enable or disable the effect of a group option,\norder is important because options are processed first to last. For\nexample, --disable-keys --lock-tables --skip-opt would not have the\nintended effect; it is the same as --skip-opt by itself.  Examples\n\nTo make a backup of an entire database:\n\nmysqldump dbname > backup-file.sql\n\nTo load the dump file back into the server:\n\nmysql dbname < backup-file.sql\n\nAnother way to reload the dump file:\n\nmysql -e \"source /path-to-backup/backup-file.sql\" dbname\n\nmysqldump is also very useful for populating databases by copying data\nfrom one MySQL server to another:\n\nmysqldump --opt dbname | mysql --host=remotehost -C dbname\n\nYou can dump several databases with one command:\n\nmysqldump --databases dbname1 [dbname2 ...] > mydatabases.sql\n\nTo dump all databases, use the --all-databases option:\n\nmysqldump --all-databases > alldatabases.sql\n\nFor InnoDB tables, mysqldump provides a way of making an online backup:\n\nmysqldump --all-databases --master-data --single-transaction > alldatabases.sql\n\nOr, in MySQL 8.0.26 and later:\n\nmysqldump --all-databases --source-data --single-transaction > alldatabases.sql\n\nThis backup acquires a global read lock on all tables (using FLUSH\nTABLES WITH READ LOCK) at the beginning of the dump. As soon as this\nlock has been acquired, the binary log coordinates are read and the\nlock is released. If long updating statements are running when the\nFLUSH statement is issued, the MySQL server may get stalled until those\nstatements finish. After that, the dump becomes lock free and does not\ndisturb reads and writes on the tables. If the update statements that\nthe MySQL server receives are short (in terms of execution time), the\ninitial lock period should not be noticeable, even with many updates.\n\nFor point-in-time recovery (also known as \"roll-forward,\" when you need\nto restore an old backup and replay the changes that happened since\nthat backup), it is often useful to rotate the binary log (see\nSection 7.4.4, \"The Binary Log\") or at least know the binary log\ncoordinates to which the dump corresponds:\n\nmysqldump --all-databases --master-data=2 > alldatabases.sql\n\nOr, in MySQL 8.0.26 and later:\n\nmysqldump --all-databases --source-data=2 > alldatabases.sql\n\nOr:\n\nmysqldump --all-databases --flush-logs --master-data=2 > alldatabases.sql\n\nOr, in MySQL 8.0.26 and later:\n\nmysqldump --all-databases --flush-logs --source-data=2 > alldatabases.sql\n\nThe --source-data or --master-data option can be used simultaneously\nwith the --single-transaction option, which provides a convenient way\nto make an online backup suitable for use prior to point-in-time\nrecovery if tables are stored using the InnoDB storage engine.\n\nFor more information on making backups, see Section 9.2, \"Database\nBackup Methods\", and Section 9.3, \"Example Backup and Recovery\nStrategy\".\n\no   To select the effect of --opt except for some features, use the\n--skip option for each feature. To disable extended inserts and\nmemory buffering, use --opt --skip-extended-insert --skip-quick.\n(Actually, --skip-extended-insert --skip-quick is sufficient\nbecause --opt is on by default.)\n\no   To reverse --opt for all features except disabling of indexes and\ntable locking, use --skip-opt --disable-keys --lock-tables.\nRestrictions\n\nmysqldump does not dump the performanceschema or sys schema by\ndefault. To dump any of these, name them explicitly on the command\nline. You can also name them with the --databases option. For\nperformanceschema, also use the --skip-lock-tables option.\n\nmysqldump does not dump the INFORMATIONSCHEMA schema.\n\nmysqldump does not dump InnoDB CREATE TABLESPACE statements.\n\nmysqldump does not dump the NDB Cluster ndbinfo information database.\n\nmysqldump includes statements to recreate the generallog and\nslowquerylog tables for dumps of the mysql database. Log table\ncontents are not dumped.\n\nIf you encounter problems backing up views due to insufficient\nprivileges, see Section 27.9, \"Restrictions on Views\" for a workaround.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 1997, 2024, Oracle and/or its affiliates.\n\nThis documentation is free software; you can redistribute it and/or\nmodify it only under the terms of the GNU General Public License as\npublished by the Free Software Foundation; version 2 of the License.\n\nThis documentation is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith the program; if not, write to the Free Software Foundation, Inc.,\n51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see\nhttp://www.gnu.org/licenses/.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. MySQL Shell dump utilities\nhttps://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-dump-instance-schema.html\n\n2. MySQL Shell load dump utilities\nhttps://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-load-dump.html\n\n3. here\nhttps://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html\n\n4. Downgrade Notes\nhttps://dev.mysql.com/doc/refman/5.7/en/downgrading-to-previous-series.html\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "For more information, please refer to the MySQL Reference Manual, which\nmay already be installed locally and which is also available online at\nhttp://dev.mysql.com/doc/.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Oracle Corporation (http://dev.mysql.com/).\n\nMySQL 8.0                         12/13/2024                      MYSQLDUMP(1)",
            "subsections": []
        }
    },
    "summary": "mysqldump - a database backup program",
    "flags": [],
    "examples": [],
    "see_also": []
}