13.7.5 CLONE Statement语句

CLONE clone_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实例(接收者)。

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节,“克隆远程数据”