aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2011-12-22 04:51:41 +0100
committerStefan Kangas <skangas@skangas.se>2011-12-22 04:51:41 +0100
commitbca0025c34ce16f5c29429ecd6407245c7e41261 (patch)
tree8fa893d439d8c24e736cc7d406d852b170ae0c11
parentcdd81d60f2f3dedb9960f8f8a015f24963b540e8 (diff)
Improve MySQL replication setup documentation
-rw-r--r--fripost-docs.org19
1 files changed, 11 insertions, 8 deletions
diff --git a/fripost-docs.org b/fripost-docs.org
index f15810f..7dba190 100644
--- a/fripost-docs.org
+++ b/fripost-docs.org
@@ -495,7 +495,7 @@ mysql -u root -p
# Create mail user
- CREATE USER 'mail'@'localhost' IDENTIFIED BY 'mijhl9hniiMu5WxvvtdgsacxZ';
+ CREATE USER 'mail'@'localhost' IDENTIFIED BY '<password>';
GRANT SELECT ON mail.alias TO 'mail'@'localhost';
GRANT SELECT ON mail.domain TO 'mail'@'localhost';
GRANT SELECT ON mail.mailbox TO 'mail'@'localhost';
@@ -521,6 +521,13 @@ These instructions are mainly adapted from the MySQL manual.
/etc/init.d/mysql restart
+# Enter MySQL shell and create a user with replication privileges.
+# NB: Use only ASCII for the <password>
+mysql -u root -p
+
+ GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'localhost' IDENTIFIED BY '<password>';
+ FLUSH PRIVILEGES;
+
***** Configure the slave
****** Set up an SSH tunnel
@@ -528,17 +535,13 @@ We begin by setting up an SSH tunnel from the slave to the master, as described
****** Preparing steps to take on master
-# Enter MySQL shell and create a user with replication privileges.
-# NB: Use only ASCII for the <password>
+# Make a database dump.
+
mysql -u root -p
- GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'localhost' IDENTIFIED BY '<password>';
- FLUSH PRIVILEGES;
USE mail;
FLUSH TABLES WITH READ LOCK;
quit;
-
-# Make a database dump.
mysqldump -u root -p --opt mail > mydump.sql
@@ -568,7 +571,7 @@ sudo chmod 0750 $TMP_DIR
server-id = 2
relay-log = mysqld-relay-bin
-/etc/init.d/mysql restart
+sudo service mysql restart
# Enter the MySQL shell and create the database: