CLONEclone_action
clone_action
: { LOCAL DATA DIRECTORY [=] 'clone_dir
'; | INSTANCE FROM 'user
'@'host
':port
IDENTIFIED BY 'password
' [DATA DIRECTORY [=] 'clone_dir
'] [REQUIRE [NO] SSL] }
The CLONE
statement is used to clone data locally or from a remote MySQL server instance. CLONE
语句用于在本地或从远程MySQL服务器实例克隆数据。To use 要使用CLONE
syntax, the clone plugin must be installed. CLONE
语法,必须安装克隆插件。See Section 5.6.7, “The Clone Plugin”.请参阅第5.6.7节,“克隆插件”。
CLONE LOCAL DATA DIRECTORY
syntax clones data from the local MySQL data directory to a directory on the same server or node where the MySQL server instance runs. CLONE LOCAL DATA DIRECTORY
语法将数据从本地MySQL数据目录克隆到运行MySQL服务器实例的同一服务器或节点上的目录。The 'clone_dir'
directory is the full path of the local directory that data is cloned to. 'clone_dir'
目录是数据克隆到的本地目录的完整路径。An absolute path is required. 需要绝对路径。The specified directory must not exist, but the specified path must be an existent path. 指定的目录不能存在,但指定的路径必须是存在的路径。The MySQL server requires the necessary write access to create the specified directory. MySQL服务器需要必要的写访问权限才能创建指定的目录。For more information, see Section 5.6.7.2, “Cloning Data Locally”.有关更多信息,请参阅第5.6.7.2节,“本地克隆数据”。
CLONE INSTANCE
syntax clones data from a remote MySQL server instance (the donor) and transfers it to the MySQL instance where the cloning operation was initiated (the recipient).CLONE INSTANCE
语法从远程MySQL服务器实例(发送者)克隆数据,并将其传输到启动克隆操作的MySQL实例(接收者)。
is the clone user on the donor MySQL server instance.user
user
是捐赠者MySQL服务器实例上的克隆用户。
is the host
hostname
address of the donor MySQL server instance. host
是捐赠者MySQL服务器实例的hostname
地址。Internet Protocol version 6 (IPv6) address format is not supported. 不支持Internet协议版本6(IPv6)地址格式。An alias to the IPv6 address can be used instead. 可以改用IPv6地址的别名。An IPv4 address can be used as is.IPv4地址可以按原样使用。
is the port
port
number of the donor MySQL server instance. port
是捐赠者MySQL服务器实例的端口号。(The X Protocol port specified by (不支持mysqlx_port
is not supported. Connecting to the donor MySQL server instance through MySQL Router is also not supported.)mysqlx_port
指定的X协议端口。也不支持通过MySQL路由器连接到捐赠方MySQL服务器实例。)
IDENTIFIED BY '
specifies the password of the clone user on the donor MySQL server instance.password
'IDENTIFIED BY '
指定捐赠方MySQL服务器实例上克隆用户的密码。password
'
DATA DIRECTORY [=] '
is an optional clause used to specify a directory on the recipient for the data you are cloning. clone_dir
'DATA DIRECTORY [=] '
是一个可选子句,用于为要克隆的数据指定收件人上的目录。clone_dir
'Use this option if you do not want to remove existing data in the recipient data directory. 如果不希望删除收件人数据目录中的现有数据,请使用此选项。An absolute path is required, and the directory must not exist. 需要绝对路径,且目录不得存在。The MySQL server must have the necessary write access to create the directory.MySQL服务器必须具有创建目录所需的写访问权限。
When the optional 如果未使用可选的DATA DIRECTORY [=] '
clause is not used, a cloning operation removes existing data in the recipient data directory, replaces it with the cloned data, and automatically restarts the server afterward.clone_dir
'DATA DIRECTORY [=] '
子句,则克隆操作会删除收件人数据目录中的现有数据,并将其替换为克隆数据,然后自动重新启动服务器。clone_dir
'
[REQUIRE [NO] SSL]
explicitly specifies whether an encrypted connection is to be used or not when transferring cloned data over the network. [REQUIRE [NO] SSL]
明确指定在网络上传输克隆数据时是否使用加密连接。An error is returned if the explicit specification cannot be satisfied. 如果无法满足显式规范,则返回错误。If an SSL clause is not specified, clone attempts to establish an encrypted connection by default, falling back to an insecure connection if the secure connection attempt fails. 如果未指定SSL子句,克隆将在默认情况下尝试建立加密连接,如果安全连接尝试失败,则返回到不安全连接。A secure connection is required when cloning encrypted data regardless of whether this clause is specified. 无论是否指定此子句,克隆加密数据时都需要安全连接。For more information, see Configuring an Encrypted Connection for Cloning.有关详细信息,请参阅配置用于克隆的加密连接。
For additional information about cloning data from a remote MySQL server instance, see Section 5.6.7.3, “Cloning Remote Data”.有关从远程MySQL服务器实例克隆数据的更多信息,请参阅第5.6.7.3节,“克隆远程数据”。