Merge lp:~kent/drizzle/replidocs into lp:~drizzle-trunk/drizzle/development

Proposed by KentBozlinski
Status: Merged
Approved by: Mark Atwood
Approved revision: 2370
Merged at revision: 2372
Proposed branch: lp:~kent/drizzle/replidocs
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 118 lines (+72/-16)
1 file modified
plugin/slave/docs/user_example.rst (+72/-16)
To merge this branch: bzr merge lp:~kent/drizzle/replidocs
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+68931@code.launchpad.net

Description of the change

Changed the replication example in the docs to have the proper options and be more easy to read.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/slave/docs/user_example.rst'
2--- plugin/slave/docs/user_example.rst 2011-03-14 20:08:52 +0000
3+++ plugin/slave/docs/user_example.rst 2011-07-23 00:29:07 +0000
4@@ -1,36 +1,92 @@
5 How to use replication: An example
6 ====================================
7
8-Simple replication setup (using a single master and a single slave) between two Drizzle servers is straightforward with the replication slave plugin. With Drizzle replication, you can also provision a new slave into an existing setup.
9+A simple replication setup (using a single master and a single slave) between two Drizzle servers is done with the replication slave plugin. With Drizzle replication, you can also provision a new slave into an existing setup.
10
11 Replication setup begins with making certain that both master and slave share the same version of Drizzle to avoid any potential incompatibility issues.
12
13 Master Setup
14 -------------
15
16-Setting up the master is the first step. An important requirement is to start the master Drizzle database server with the --innodb.replication-log option. For example:
17-
18- master> sbin/drizzled --datadir=$PWD/var --innodb.replication-log &
19-
20-
21-For more complex setups, the --server-id option may be appropriate to use.
22+Setting up the master is the first step. An important requirement is to start the master Drizzle database server with the --innodb.replication-log option, and a few other options in most circumstances. More options can be found in the options documentation. These are the most common options needed for a replication master. For example:
23+
24+ master> usr/local/sbin/drizzled \
25+ --innodb.replication-log \
26+ --pid-file=/var/run/drizzled/drizzled.pid \
27+ --drizzle-protocol.bind-address=0.0.0.0 \
28+ --mysql-protocol.bind-address=0.0.0.0 \
29+ --daemon
30+
31+
32+Several options are required on most setups. They are set on Drizzle Startup with a --optionname. The most important ones are:
33+
34+
35+The InnoDB replication log must be running:
36+
37+--innodb.replication-log
38+
39+
40+PID must be set:
41+
42+--pid-file=/var/run/drizzled/drizzled.pid
43+
44+
45+the address binding for Drizzle's default port (4427):
46+
47+--drizzle-protocol.bind-address=0.0.0.0
48+
49+
50+The address binding for systems replicating through MySQL's default port (3306):
51+
52+--mysql-protocol.bind-address=0.0.0.0
53+
54+
55+Data Directory can be set other than default:
56+
57+--datadir=$PWD/var
58+
59+
60+For more complex setups, the server id option may be appropriate to use:
61+
62+--server-id
63+
64+
65+To run Drizzle in the background, thereby keeping the database running if the user logs out:
66+
67+--daemon
68+
69+
70
71 With the master running, you can optionally now create a backup of any databases to be imported on the new slave by using :doc:`../../clients/drizzledump`. This example, however, assumes that we are starting with a fresh database with no data.
72
73 Slave Setup
74 -------------
75
76-Starting the slave is almost as simple as starting the master. There are two Drizzle database server options required for the slave: --plugin-add=slave and --slave.config-file. For example: ::
77-
78- slave> sbin/drizzled --datadir=$PWD/var \
79- --plugin-add=slave \
80- --slave.config-file=/tmp/slave.cfg &
81-
82+Starting the slave is very similar to starting the master. There are two Drizzle database server options required for the slave: --plugin-add=slave and --slave.config-file. For example: ::
83+
84+ slave> /usr/local/sbin/drizzled \
85+ --plugin-add=slave \
86+ --slave.config-file=/usr/local/etc//slave.cfg
87+
88+A more typical startup will need more options:
89+
90+ slave> /usr/local/sbin/drizzled \
91+ --plugin-add=slave \
92+ --slave.config-file=/usr/local/etc//slave.cfg \
93+ --pid-file=/var/run/drizzled/drizzled.pid \
94+ --drizzle-protocol.bind-address=0.0.0.0 \
95+ --mysql-protocol.bind-address=0.0.0.0 \
96+ --daemon
97+
98+Similar to the Master setup, there are a number of options that can be selected. Please see the Plugin Documentation for the relevent options.
99
100 These options tell the server to load the slave plugin, and then tell the slave plugin where to find the slave host configuration file. This configuration file has options to specify the master host and a few options to control how the slave operates. You can read more about the available configuration options in the replication slave plugin documentation. Below is a simple example: ::
101
102- master-host = dino
103- master-port = 3306
104+ master-host = master.location.com
105+ master-port = 4427
106+
107+Some options that can be set other than default, but are otherwise not necessary, are:
108+
109 master-user = dino_slave
110 master-pass = my_password
111 io-thread-sleep = 10
112@@ -69,7 +125,7 @@
113
114 slave> sbin/drizzled --datadir=$PWD/var \
115 --plugin-add=slave \
116- --slave.config-file=/tmp/slave.cfg \
117+ --slave.config-file=/user/local/etc/slave.cfg \
118 --slave.max-commit-id=33426 &
119
120