From 8448d98ffe1f6adb04e67a45cd5ac19eaa0a57ee Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Sat, 8 Nov 2025 00:59:04 +0100 Subject: [PATCH] feat: add mysql shell bits --- docs/linux/mysql-replication.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/linux/mysql-replication.md b/docs/linux/mysql-replication.md index 2ae2943..fcb8c50 100644 --- a/docs/linux/mysql-replication.md +++ b/docs/linux/mysql-replication.md @@ -11,7 +11,6 @@ This is tested on MariaDB 11. ``` ```shell - [mysqld] server-id = 1 log-bin = /var/log/mysql/mysql-bin.log @@ -26,6 +25,10 @@ Restart mysql: `systemctl restart mysql` ### Create replication user +```shell +mysql -u root -p +``` + ```shell DROP USER IF EXISTS 'replicator'@'replica.example.com'; CREATE USER 'replicator'@'replica.example.com' IDENTIFIED BY 'supersecure'; @@ -83,6 +86,10 @@ mysql -u root -p < /tmp/databeast.sql ### Activate replication +```shell +mysql -u root -p +``` + ```shell STOP REPLICA; RESET REPLICA; @@ -96,6 +103,10 @@ START REPLICA; ## Monitor replication +```shell +mysql -u root -p +``` + ```shell SHOW REPLICA STATUS\G *************************** 1. row ***************************