MYSQL 8.0 远程 clone
INSTALL PLUGIN clone SONAME 'mysql_clone.so';
或
[mysqld]
plugin-load-add=mysql_clone.so
clone=FORCE_PLUS_PERMANENT
SELECT PLUGIN_NAME, PLUGIN_STATUS
FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_NAME LIKE 'clone';
1.捐赠者(source)授权
create user test_s@'%' identified by '123';
grant backup_admin on *.* to test_s@'%';
2. 接受者(target)授权
create user test_t@'%' identified by '123';
grant clone_admin on *.* to test_t@'%';
开始克隆 -->
管理用户:
mysql> SET GLOBAL clone_valid_donor_list='10.0.0.51:3306';
新窗口使用test_t用户重新连接数据库:
mysql -utest_t -p123 -h10.0.0.52 -P3306
mysql> CLONE INSTANCE FROM test_s@'10.0.0.51':3306 IDENTIFIED BY '123';