Created
June 2, 2021 10:33
-
-
Save asamofal/5381aa019594204d98436def2f7d12bc to your computer and use it in GitHub Desktop.
MySQL 8.0.17 Clone Plugin: How to Create a Slave from Scratch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.percona.com/blog/2019/08/01/mysql-8-0-17-clone-plugin-how-to-create-a-slave-from-scratch/ | |
# install clone plugin (on both instances) | |
INSTALL PLUGIN clone SONAME 'mysql_clone.so'; | |
# check if plugin is active (on both instances) | |
SELECT | |
PLUGIN_NAME, | |
PLUGIN_STATUS | |
FROM INFORMATION_SCHEMA.PLUGINS | |
WHERE PLUGIN_NAME = 'clone'; | |
# create the user for this routine | |
CREATE USER backup@'%' IDENTIFIED BY 'passowrd'; | |
GRANT BACKUP_ADMIN ON *.* TO backup@'%'; | |
# check the donor list | |
SHOW VARIABLES LIKE 'clone_valid_donor_list'; | |
# if empty let's add a new one | |
SET GLOBAL clone_valid_donor_list = 'host.docker.internal:3307'; | |
# adjust the verbosity to a higher level | |
SET GLOBAL log_error_verbosity = 3; | |
# start the cloning process | |
CLONE INSTANCE FROM host.docker.internal:3307 IDENTIFIED BY 'password'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment