Loading docs/linux/mysql-replication.md +20 −8 Original line number Diff line number Diff line Loading @@ -84,6 +84,18 @@ mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS databeast;" mysql -u root -p < /tmp/databeast.sql ``` ### Import in one go ```shell mariadb-dump -h source.example.com \ -u replicator \ -psupersecure \ --single-transaction \ --gtid \ --master-data=1 --databases databeast | \ mysql -u replicator -psupersecure databeast ``` ### Activate replication ```shell Loading @@ -91,14 +103,14 @@ mysql -u root -p ``` ```shell STOP REPLICA; RESET REPLICA; CHANGE REPLICATION SOURCE TO SOURCE_HOST='source.example.com', SOURCE_USER='replicator', SOURCE_PASSWORD='supersecure', SOURCE_USE_GTID=slave_pos; START REPLICA; STOP SLAVE; RESET SLAVE; CHANGE MASTER TO MASTER_HOST='source.example.com', MASTER_USER='replicator', MASTER_PASSWORD='supersecure', MASTER_USE_GTID=slave_pos; START SLAVE; ``` ## Monitor replication Loading Loading
docs/linux/mysql-replication.md +20 −8 Original line number Diff line number Diff line Loading @@ -84,6 +84,18 @@ mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS databeast;" mysql -u root -p < /tmp/databeast.sql ``` ### Import in one go ```shell mariadb-dump -h source.example.com \ -u replicator \ -psupersecure \ --single-transaction \ --gtid \ --master-data=1 --databases databeast | \ mysql -u replicator -psupersecure databeast ``` ### Activate replication ```shell Loading @@ -91,14 +103,14 @@ mysql -u root -p ``` ```shell STOP REPLICA; RESET REPLICA; CHANGE REPLICATION SOURCE TO SOURCE_HOST='source.example.com', SOURCE_USER='replicator', SOURCE_PASSWORD='supersecure', SOURCE_USE_GTID=slave_pos; START REPLICA; STOP SLAVE; RESET SLAVE; CHANGE MASTER TO MASTER_HOST='source.example.com', MASTER_USER='replicator', MASTER_PASSWORD='supersecure', MASTER_USE_GTID=slave_pos; START SLAVE; ``` ## Monitor replication Loading