Author: paul
Date: 2006-01-29 23:54:41 +0100 (Sun, 29 Jan 2006)
New Revision: 1111
Log:
r6875@frost: paul | 2006-01-29 16:29:18 -0600
General revisions.
Modified:
trunk/
trunk/refman-4.1/connector-odbc.xml
trunk/refman-4.1/innodb.xml
trunk/refman-4.1/replication.xml
trunk/refman-5.0/connector-odbc.xml
trunk/refman-5.0/innodb.xml
trunk/refman-5.0/replication.xml
trunk/refman-5.1/connector-odbc.xml
trunk/refman-5.1/innodb.xml
trunk/refman-5.1/replication.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6874
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2588
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6875
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2588
Modified: trunk/refman-4.1/connector-odbc.xml
===================================================================
--- trunk/refman-4.1/connector-odbc.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-4.1/connector-odbc.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -3581,7 +3581,7 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
+ Note: If you are using MySQL 3.22, you must apply the
MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to
work around this problem.
</para>
@@ -4320,8 +4320,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
@@ -4668,8 +4668,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
Modified: trunk/refman-4.1/innodb.xml
===================================================================
--- trunk/refman-4.1/innodb.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-4.1/innodb.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -1289,8 +1289,9 @@
</para>
<para>
- For the greatest possible durability and consistency in a
- replication setup you should use
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
<literal>innodb_flush_log_at_trx_commit=1</literal>,
<literal>sync_binlog=1</literal>, and
<literal>innodb_safe_binlog</literal> in your master server
Modified: trunk/refman-4.1/replication.xml
===================================================================
--- trunk/refman-4.1/replication.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-4.1/replication.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -938,25 +938,25 @@
<title>&title-replication-howto;</title>
<para>
- Here is a brief description of how to set up complete replication
- of your current MySQL server. It assumes that you want to
- replicate all databases on the master and have not previously
- configured replication. You need to shut down your master server
- briefly to complete the steps outlined here.
+ This section briefly describes how to set up complete replication
+ of a MySQL server. It assumes that you want to replicate all
+ databases on the master and have not previously configured
+ replication. You must shut down your master server briefly to
+ complete the steps outlined here.
</para>
<para>
This procedure is written in terms of setting up a single slave,
- but you can use it to set up multiple slaves.
+ but you can repeat it to set up multiple slaves.
</para>
<para>
Although this method is the most straightforward way to set up a
slave, it is not the only one. For example, if you have a snapshot
- of the master's data, and the master has its server ID set and
- binary logging enabled, you can set up a slave without shutting
- down the master or even blocking updates to it. For more details,
- please see <xref linkend="replication-faq"/>.
+ of the master's data, and the master already has its server ID set
+ and binary logging enabled, you can set up a slave without
+ shutting down the master or even blocking updates to it. For more
+ details, please see <xref linkend="replication-faq"/>.
</para>
<para>
@@ -964,15 +964,15 @@
that you read this entire chapter through and try all statements
mentioned in <xref linkend="replication-master-sql"/>, and
<xref linkend="replication-slave-sql"/>. You should also
- familiarize yourself with replication startup options described in
- <xref linkend="replication-options"/>.
+ familiarize yourself with the replication startup options
+ described in <xref linkend="replication-options"/>.
</para>
<para>
- Note that this procedure and some of the replication SQL
- statements in later sections refer to the <literal>SUPER</literal>
- privilege. Prior to MySQL 4.0.2, use the
- <literal>PROCESS</literal> privilege instead.
+ <emphasis role="bold">Note</emphasis>: This procedure and some of
+ the replication SQL statements shown in later sections refer to
+ the <literal>SUPER</literal> privilege. Prior to MySQL 4.0.2, use
+ the <literal>PROCESS</literal> privilege instead.
</para>
<orderedlist>
@@ -986,8 +986,9 @@
</para>
<para>
- Please do not report bugs until you have verified that the
- problem is present in the latest MySQL release.
+ If you encounter a problem, please do not report it as a bug
+ until you have verified that the problem is present in the
+ latest MySQL release.
</para>
</listitem>
@@ -997,18 +998,16 @@
can use to connect. This account must be given the
<literal>REPLICATION SLAVE</literal> privilege. If the account
is used only for replication (which is recommended), you don't
- need to grant any additional privileges. (For information
- about setting up user accounts and privileges, see
- <xref linkend="user-account-management"/>.)
+ need to grant any additional privileges.
</para>
<para>
Suppose that your domain is <literal>mydomain.com</literal>
- and you want to create an account with a username of
+ and that you want to create an account with a username of
<literal>repl</literal> such that slave servers can use the
account to access the master server from any host in your
domain using a password of <literal>slavepass</literal>. To
- create the account, this use <literal>GRANT</literal>
+ create the account, use this <literal>GRANT</literal>
statement:
</para>
@@ -1031,7 +1030,7 @@
<para>
If you plan to use the <literal>LOAD TABLE FROM
MASTER</literal> or <literal>LOAD DATA FROM MASTER</literal>
- statements from the slave host, you need to grant this account
+ statements from the slave host, you must grant this account
additional privileges:
</para>
@@ -1048,12 +1047,17 @@
<para>
Grant the <literal>SELECT</literal> privilege for all
tables that you want to load. Any master tables from which
- the account cannot <literal>SELECT</literal> are ignored
- by <literal>LOAD DATA FROM MASTER</literal>.
+ the account cannot <literal>SELECT</literal> will be
+ ignored by <literal>LOAD DATA FROM MASTER</literal>.
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ For additional information about setting up user accounts and
+ privileges, see <xref linkend="user-account-management"/>.
+ </para>
</listitem>
<listitem>
@@ -1067,8 +1071,8 @@
</programlisting>
<para>
- For <literal>InnoDB</literal> tables, note the following:
- <literal>FLUSH TABLES WITH READ LOCK</literal> blocks
+ For <literal>InnoDB</literal> tables, note that <literal>FLUSH
+ TABLES WITH READ LOCK</literal> blocks
<literal>COMMIT</literal> operations, too. (This is true as of
MySQL version 4.0.20.) When you have acquired your global read
lock, you can start a filesystem snapshot of your
@@ -1146,7 +1150,7 @@
</para>
<programlisting>
-mysql > SHOW MASTER STATUS;
+mysql > <userinput>SHOW MASTER STATUS;</userinput>
+---------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+---------------+----------+--------------+------------------+
@@ -1155,16 +1159,26 @@
</programlisting>
<para>
- The <literal>File</literal> column shows the name of the log,
- while <literal>Position</literal> shows the offset. In this
- example, the binary log value is
+ The <literal>File</literal> column shows the name of the log
+ and <literal>Position</literal> shows the offset within the
+ file. In this example, the binary log file is
<literal>mysql-bin.003</literal> and the offset is 73. Record
- the values. You need to use them later when you are setting up
- the slave. They represent the replication coordinates at which
- the slave should begin processing new updates from the master.
+ these values. You need them later when you are setting up the
+ slave. They represent the replication coordinates at which the
+ slave should begin processing new updates from the master.
</para>
<para>
+ If the master has been running previously without binary
+ logging enabled, the log name and position values displayed by
+ <literal>SHOW MASTER STATUS</literal> or <command>mysqldump
+ --master-data</command> will be empty. In that case, the
+ values that you need to use later when specifying the slave's
+ log file and position are the empty string
+ (<literal>''</literal>) and <literal>4</literal>.
+ </para>
+
+ <para>
After you have taken the snapshot and recorded the log name
and offset, you can re-enable write activity on the master:
</para>
@@ -1224,16 +1238,6 @@
dump file into your slave. However, this is slower than doing
a binary copy.
</para>
-
- <para>
- If the master has been previously running without
- <option>--log-bin</option> enabled, the log name and position
- values displayed by <literal>SHOW MASTER STATUS</literal> or
- <command>mysqldump --master-data</command> are empty. In that
- case, the values that you need to use later when specifying
- the slave's log file and position are the empty string
- (<literal>''</literal>) and <literal>4</literal>.
- </para>
</listitem>
<listitem>
@@ -1241,10 +1245,11 @@
Make sure that the <literal>[mysqld]</literal> section of the
<filename>my.cnf</filename> file on the master host includes a
<literal>log-bin</literal> option. The section should also
- have a <literal>server-id=master_id</literal> option, where
- <literal>master_id</literal> must be a positive integer value
- from 1 to 2<superscript>32</superscript> − 1. For
- example:
+ have a
+ <literal>server-id=<replaceable>master_id</replaceable></literal>
+ option, where <replaceable>master_id</replaceable> must be a
+ positive integer value from 1 to
+ 2<superscript>32</superscript> − 1. For example:
</para>
<programlisting>
@@ -1255,26 +1260,37 @@
<para>
If those options are not present, add them and restart the
- server.
+ server. The server cannot act as a replication master unless
+ binary logging is enabled.
</para>
+
+ <para>
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
+ <literal>innodb_flush_log_at_trx_commit=1</literal>,
+ <literal>sync_binlog=1</literal>, and
+ <literal>innodb_safe_binlog</literal> in your master
+ <filename>my.cnf</filename> file.
+ </para>
</listitem>
<listitem>
<para>
- Stop the server that is to be used as a slave server and add
- the following to its <filename>my.cnf</filename> file:
+ Stop the server that is to be used as a slave and add the
+ following lines to its <filename>my.cnf</filename> file:
</para>
<programlisting>
[mysqld]
-server-id=slave_id
+server-id=<replaceable>slave_id</replaceable>
</programlisting>
<para>
- The <literal>slave_id</literal> value, like the
- <literal>master_id</literal> value, must be a positive integer
- value from 1 to 2<superscript>32</superscript> − 1. In
- addition, it is very important that the ID of the slave be
+ The <replaceable>slave_id</replaceable> value, like the
+ <replaceable>master_id</replaceable> value, must be a positive
+ integer value from 1 to 2<superscript>32</superscript> −
+ 1. In addition, it is necessary that the ID of the slave be
different from the ID of the master. For example:
</para>
@@ -1309,14 +1325,14 @@
If you made a binary backup of the master server's data, copy
it to the slave server's data directory before starting the
slave. Make sure that the privileges on the files and
- directories are correct. The user that the server MySQL runs
- as must able to read and write the files, just as on the
- master.
+ directories are correct. The system account that you use to
+ run the slave server must be able to read and write the files,
+ just as on the master.
</para>
<para>
If you made a backup using <command>mysqldump</command>, start
- the slave first (see next step).
+ the slave first. The dump file is loaded in a later step.
</para>
</listitem>
@@ -1327,12 +1343,12 @@
<option>--skip-slave-start</option> option so that it doesn't
immediately try to connect to its master. You also may want to
start the slave server with the
- <option>--log-warnings</option> option (enabled by default as
- of MySQL 4.0.19 and 4.1.2), to get more messages in the error
- log about problems (for example, network or connection
- problems). As of MySQL 4.0.21 and 4.1.3, aborted connections
- are not logged to the error log unless the value is greater
- than 1.
+ <option>--log-warnings</option> option to get more messages in
+ the error log about problems (for example, network or
+ connection problems). The option is enabled by default as of
+ MySQL 4.0.19 and 4.1.2, but as of MySQL 4.0.21 and 4.1.3,
+ aborted connections are not logged to the error log unless the
+ value is greater than 1.
</para>
</listitem>
@@ -1356,11 +1372,11 @@
<programlisting>
mysql> <userinput>CHANGE MASTER TO</userinput>
- -> <userinput>MASTER_HOST='master_host_name',</userinput>
- -> <userinput>MASTER_USER='replication_user_name',</userinput>
- -> <userinput>MASTER_PASSWORD='replication_password',</userinput>
- -> <userinput>MASTER_LOG_FILE='recorded_log_file_name',</userinput>
- -> <userinput>MASTER_LOG_POS=recorded_log_position;</userinput>
+ -> <userinput>MASTER_HOST='<replaceable>master_host_name</replaceable>',</userinput>
+ -> <userinput>MASTER_USER='<replaceable>replication_user_name</replaceable>',</userinput>
+ -> <userinput>MASTER_PASSWORD='<replaceable>replication_password</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_FILE='<replaceable>recorded_log_file_name</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_POS=<replaceable>recorded_log_position</replaceable>;</userinput>
</programlisting>
<para>
@@ -1458,16 +1474,6 @@
the same one for each slave.
</para>
- <para>
- Note: For the greatest possible durability and consistency in a
- replication setup using <literal>InnoDB</literal> with
- transactions you should use
- <literal>innodb_flush_log_at_trx_commit=1</literal>,
- <literal>sync_binlog=1</literal>, and
- <literal>innodb_safe_binlog</literal> in your master
- <filename>my.cnf</filename> file.
- </para>
-
</section>
<section id="replication-compatibility">
Modified: trunk/refman-5.0/connector-odbc.xml
===================================================================
--- trunk/refman-5.0/connector-odbc.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.0/connector-odbc.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -3581,7 +3581,7 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
+ Note: If you are using MySQL 3.22, you must apply the
MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to
work around this problem.
</para>
@@ -4320,8 +4320,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
@@ -4668,8 +4668,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
Modified: trunk/refman-5.0/innodb.xml
===================================================================
--- trunk/refman-5.0/innodb.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.0/innodb.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -1290,8 +1290,9 @@
</para>
<para>
- For the greatest possible durability and consistency in a
- replication setup you should use
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
<literal>innodb_flush_log_at_trx_commit=1</literal>,
<literal>sync_binlog=1</literal>, and, before MySQL 5.0.3,
<literal>innodb_safe_binlog</literal> in your master server
Modified: trunk/refman-5.0/replication.xml
===================================================================
--- trunk/refman-5.0/replication.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.0/replication.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -881,25 +881,25 @@
<title>&title-replication-howto;</title>
<para>
- Here is a brief description of how to set up complete replication
- of your current MySQL server. It assumes that you want to
- replicate all databases on the master and have not previously
- configured replication. You need to shut down your master server
- briefly to complete the steps outlined here.
+ This section briefly describes how to set up complete replication
+ of a MySQL server. It assumes that you want to replicate all
+ databases on the master and have not previously configured
+ replication. You must shut down your master server briefly to
+ complete the steps outlined here.
</para>
<para>
This procedure is written in terms of setting up a single slave,
- but you can use it to set up multiple slaves.
+ but you can repeat it to set up multiple slaves.
</para>
<para>
Although this method is the most straightforward way to set up a
slave, it is not the only one. For example, if you have a snapshot
- of the master's data, and the master has its server ID set and
- binary logging enabled, you can set up a slave without shutting
- down the master or even blocking updates to it. For more details,
- please see <xref linkend="replication-faq"/>.
+ of the master's data, and the master already has its server ID set
+ and binary logging enabled, you can set up a slave without
+ shutting down the master or even blocking updates to it. For more
+ details, please see <xref linkend="replication-faq"/>.
</para>
<para>
@@ -907,12 +907,12 @@
that you read this entire chapter through and try all statements
mentioned in <xref linkend="replication-master-sql"/>, and
<xref linkend="replication-slave-sql"/>. You should also
- familiarize yourself with replication startup options described in
- <xref linkend="replication-options"/>.
+ familiarize yourself with the replication startup options
+ described in <xref linkend="replication-options"/>.
</para>
<para>
- <emphasis role="bold">Note</emphasis>: this procedure and some of
+ <emphasis role="bold">Note</emphasis>: This procedure and some of
the replication SQL statements shown in later sections require the
<literal>SUPER</literal> privilege.
</para>
@@ -929,8 +929,9 @@
</para>
<para>
- Please do not report bugs until you have verified that the
- problem is present in the latest MySQL release.
+ If you encounter a problem, please do not report it as a bug
+ until you have verified that the problem is present in the
+ latest MySQL release.
</para>
</listitem>
@@ -940,18 +941,16 @@
can use to connect. This account must be given the
<literal>REPLICATION SLAVE</literal> privilege. If the account
is used only for replication (which is recommended), you don't
- need to grant any additional privileges. (For information
- about setting up user accounts and privileges, see
- <xref linkend="user-account-management"/>.)
+ need to grant any additional privileges.
</para>
<para>
Suppose that your domain is <literal>mydomain.com</literal>
- and you want to create an account with a username of
+ and that you want to create an account with a username of
<literal>repl</literal> such that slave servers can use the
account to access the master server from any host in your
domain using a password of <literal>slavepass</literal>. To
- create the account, this use <literal>GRANT</literal>
+ create the account, use this <literal>GRANT</literal>
statement:
</para>
@@ -963,7 +962,7 @@
<para>
If you plan to use the <literal>LOAD TABLE FROM
MASTER</literal> or <literal>LOAD DATA FROM MASTER</literal>
- statements from the slave host, you need to grant this account
+ statements from the slave host, you must grant this account
additional privileges:
</para>
@@ -980,12 +979,17 @@
<para>
Grant the <literal>SELECT</literal> privilege for all
tables that you want to load. Any master tables from which
- the account cannot <literal>SELECT</literal> are ignored
- by <literal>LOAD DATA FROM MASTER</literal>.
+ the account cannot <literal>SELECT</literal> will be
+ ignored by <literal>LOAD DATA FROM MASTER</literal>.
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ For additional information about setting up user accounts and
+ privileges, see <xref linkend="user-account-management"/>.
+ </para>
</listitem>
<listitem>
@@ -999,8 +1003,8 @@
</programlisting>
<para>
- For <literal>InnoDB</literal> tables, note the following:
- <literal>FLUSH TABLES WITH READ LOCK</literal> also blocks
+ For <literal>InnoDB</literal> tables, note that <literal>FLUSH
+ TABLES WITH READ LOCK</literal> also blocks
<literal>COMMIT</literal> operations. When you have acquired a
global read lock, you can start a filesystem snapshot of your
<literal>InnoDB</literal> tables. Internally (inside the
@@ -1076,7 +1080,7 @@
</para>
<programlisting>
-mysql > SHOW MASTER STATUS;
+mysql > <userinput>SHOW MASTER STATUS;</userinput>
+---------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+---------------+----------+--------------+------------------+
@@ -1085,16 +1089,26 @@
</programlisting>
<para>
- The <literal>File</literal> column shows the name of the log,
- while <literal>Position</literal> shows the offset. In this
- example, the binary log value is
+ The <literal>File</literal> column shows the name of the log
+ and <literal>Position</literal> shows the offset within the
+ file. In this example, the binary log file is
<literal>mysql-bin.003</literal> and the offset is 73. Record
- the values. You need to use them later when you are setting up
- the slave. They represent the replication coordinates at which
- the slave should begin processing new updates from the master.
+ these values. You need them later when you are setting up the
+ slave. They represent the replication coordinates at which the
+ slave should begin processing new updates from the master.
</para>
<para>
+ If the master has been running previously without binary
+ logging enabled, the log name and position values displayed by
+ <literal>SHOW MASTER STATUS</literal> or <command>mysqldump
+ --master-data</command> will be empty. In that case, the
+ values that you need to use later when specifying the slave's
+ log file and position are the empty string
+ (<literal>''</literal>) and <literal>4</literal>.
+ </para>
+
+ <para>
After you have taken the snapshot and recorded the log name
and offset, you can re-enable write activity on the master:
</para>
@@ -1154,16 +1168,6 @@
dump file into your slave. However, this is slower than doing
a binary copy.
</para>
-
- <para>
- If the master has been previously running without
- <option>--log-bin</option> enabled, the log name and position
- values displayed by <literal>SHOW MASTER STATUS</literal> or
- <command>mysqldump --master-data</command> are empty. In that
- case, the values that you need to use later when specifying
- the slave's log file and position are the empty string
- (<literal>''</literal>) and <literal>4</literal>.
- </para>
</listitem>
<listitem>
@@ -1171,10 +1175,11 @@
Make sure that the <literal>[mysqld]</literal> section of the
<filename>my.cnf</filename> file on the master host includes a
<literal>log-bin</literal> option. The section should also
- have a <literal>server-id=master_id</literal> option, where
- <literal>master_id</literal> must be a positive integer value
- from 1 to 2<superscript>32</superscript> − 1. For
- example:
+ have a
+ <literal>server-id=<replaceable>master_id</replaceable></literal>
+ option, where <replaceable>master_id</replaceable> must be a
+ positive integer value from 1 to
+ 2<superscript>32</superscript> − 1. For example:
</para>
<programlisting>
@@ -1185,26 +1190,39 @@
<para>
If those options are not present, add them and restart the
- server.
+ server. The server cannot act as a replication master unless
+ binary logging is enabled.
</para>
+
+ <para>
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
+ <literal>innodb_flush_log_at_trx_commit=1</literal>,
+ <literal>sync_binlog=1</literal>, and, before MySQL 5.0.3,
+ <literal>innodb_safe_binlog</literal>, in the master
+ <filename>my.cnf</filename> file.
+ (<literal>innodb_safe_binlog</literal> is not needed from
+ 5.0.3 on.)
+ </para>
</listitem>
<listitem>
<para>
- Stop the server that is to be used as a slave server and add
- the following to its <filename>my.cnf</filename> file:
+ Stop the server that is to be used as a slave and add the
+ following lines to its <filename>my.cnf</filename> file:
</para>
<programlisting>
[mysqld]
-server-id=slave_id
+server-id=<replaceable>slave_id</replaceable>
</programlisting>
<para>
- The <literal>slave_id</literal> value, like the
- <literal>master_id</literal> value, must be a positive integer
- value from 1 to 2<superscript>32</superscript> − 1. In
- addition, it is very important that the ID of the slave be
+ The <replaceable>slave_id</replaceable> value, like the
+ <replaceable>master_id</replaceable> value, must be a positive
+ integer value from 1 to 2<superscript>32</superscript> −
+ 1. In addition, it is necessary that the ID of the slave be
different from the ID of the master. For example:
</para>
@@ -1239,14 +1257,14 @@
If you made a binary backup of the master server's data, copy
it to the slave server's data directory before starting the
slave. Make sure that the privileges on the files and
- directories are correct. The user that the server MySQL runs
- as must able to read and write the files, just as on the
- master.
+ directories are correct. The system account that you use to
+ run the slave server must be able to read and write the files,
+ just as on the master.
</para>
<para>
If you made a backup using <command>mysqldump</command>, start
- the slave first (see next step).
+ the slave first. The dump file is loaded in a later step.
</para>
</listitem>
@@ -1257,11 +1275,11 @@
<option>--skip-slave-start</option> option so that it doesn't
immediately try to connect to its master. You also may want to
start the slave server with the
- <option>--log-warnings</option> option (enabled by default),
- to get more messages in the error log about problems (for
- example, network or connection problems). Aborted connections
- are not logged to the error log unless the value is greater
- than <literal>1</literal>.
+ <option>--log-warnings</option> option to get more messages in
+ the error log about problems (for example, network or
+ connection problems). The option is enabled by default, but
+ aborted connections are not logged to the error log unless the
+ option value is greater than 1.
</para>
</listitem>
@@ -1285,11 +1303,11 @@
<programlisting>
mysql> <userinput>CHANGE MASTER TO</userinput>
- -> <userinput>MASTER_HOST='master_host_name',</userinput>
- -> <userinput>MASTER_USER='replication_user_name',</userinput>
- -> <userinput>MASTER_PASSWORD='replication_password',</userinput>
- -> <userinput>MASTER_LOG_FILE='recorded_log_file_name',</userinput>
- -> <userinput>MASTER_LOG_POS=recorded_log_position;</userinput>
+ -> <userinput>MASTER_HOST='<replaceable>master_host_name</replaceable>',</userinput>
+ -> <userinput>MASTER_USER='<replaceable>replication_user_name</replaceable>',</userinput>
+ -> <userinput>MASTER_PASSWORD='<replaceable>replication_password</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_FILE='<replaceable>recorded_log_file_name</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_POS=<replaceable>recorded_log_position</replaceable>;</userinput>
</programlisting>
<para>
@@ -1387,18 +1405,6 @@
the same one for each slave.
</para>
- <para>
- Note: For the greatest possible durability and consistency in a
- replication setup using <literal>InnoDB</literal> with
- transactions you should use
- <literal>innodb_flush_log_at_trx_commit=1</literal>,
- <literal>sync_binlog=1</literal>, and, before MySQL 5.0.3,
- <literal>innodb_safe_binlog</literal>, in the master
- <filename>my.cnf</filename> file.
- (<literal>innodb_safe_binlog</literal> is not needed from 5.0.3
- on.)
- </para>
-
</section>
<section id="replication-compatibility">
Modified: trunk/refman-5.1/connector-odbc.xml
===================================================================
--- trunk/refman-5.1/connector-odbc.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.1/connector-odbc.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -3581,7 +3581,7 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
+ Note: If you are using MySQL 3.22, you must apply the
MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to
work around this problem.
</para>
@@ -4320,8 +4320,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
@@ -4668,8 +4668,8 @@
</para>
<para>
- Note: If you are using MySQL 3.22, you must to apply the
- MDAC patch and use MyODBC 2.50.32 or 2.50.34 and up to work
+ Note: If you are using MySQL 3.22, you must apply the MDAC
+ patch and use MyODBC 2.50.32 or 2.50.34 and up to work
around this problem.
</para>
</listitem>
Modified: trunk/refman-5.1/innodb.xml
===================================================================
--- trunk/refman-5.1/innodb.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.1/innodb.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -1286,8 +1286,9 @@
</para>
<para>
- For the greatest possible durability and consistency in a
- replication setup you should use
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
<literal>innodb_flush_log_at_trx_commit=1</literal> and
<literal>sync_binlog=1</literal> in your master server
<filename>my.cnf</filename> file.
Modified: trunk/refman-5.1/replication.xml
===================================================================
--- trunk/refman-5.1/replication.xml 2006-01-29 22:54:16 UTC (rev 1110)
+++ trunk/refman-5.1/replication.xml 2006-01-29 22:54:41 UTC (rev 1111)
@@ -93,9 +93,8 @@
tables on the slave. Keep in mind as well that updates on the
slave side might be affected differently depending on whether you
are using statement-based or row-based replication. Consider the
- following scenario, where a record is inserted on the slave,
- followed by a statement on the master side that should empty the
- table:
+ following scenario, where a row is inserted on the slave, followed
+ by a statement on the master side that should empty the table:
</para>
<programlisting>
@@ -112,8 +111,8 @@
result, <literal>tbl</literal> has the same contents on both
servers. With row-based replication, the effect of the
<literal>DELETE</literal> on the slave is different. The master
- writes to its binary log each record to be deleted from the table.
- The slave deletes only those records, and not the row that was
+ writes to its binary log each row to be deleted from the table.
+ The slave deletes only those rows, and not the row that was
inserted on the slave side. As a result, the table has different
contents on the master and server, which may cause replication
problems.
@@ -1059,25 +1058,25 @@
<title>&title-replication-howto;</title>
<para>
- Here is a brief description of how to set up complete replication
- of your current MySQL server. It assumes that you want to
- replicate all databases on the master and have not previously
- configured replication. You need to shut down your master server
- briefly to complete the steps outlined here.
+ This section briefly describes how to set up complete replication
+ of a MySQL server. It assumes that you want to replicate all
+ databases on the master and have not previously configured
+ replication. You must shut down your master server briefly to
+ complete the steps outlined here.
</para>
<para>
This procedure is written in terms of setting up a single slave,
- but you can use it to set up multiple slaves.
+ but you can repeat it to set up multiple slaves.
</para>
<para>
Although this method is the most straightforward way to set up a
slave, it is not the only one. For example, if you have a snapshot
- of the master's data, and the master has its server ID set and
- binary logging enabled, you can set up a slave without shutting
- down the master or even blocking updates to it. For more details,
- please see <xref linkend="replication-faq"/>.
+ of the master's data, and the master already has its server ID set
+ and binary logging enabled, you can set up a slave without
+ shutting down the master or even blocking updates to it. For more
+ details, please see <xref linkend="replication-faq"/>.
</para>
<para>
@@ -1085,12 +1084,12 @@
that you read this entire chapter through and try all statements
mentioned in <xref linkend="replication-master-sql"/>, and
<xref linkend="replication-slave-sql"/>. You should also
- familiarize yourself with replication startup options described in
- <xref linkend="replication-options"/>.
+ familiarize yourself with the replication startup options
+ described in <xref linkend="replication-options"/>.
</para>
<para>
- <emphasis role="bold">Note</emphasis>: this procedure and some of
+ <emphasis role="bold">Note</emphasis>: This procedure and some of
the replication SQL statements shown in later sections require the
<literal>SUPER</literal> privilege.
</para>
@@ -1107,8 +1106,9 @@
</para>
<para>
- Please do not report bugs until you have verified that the
- problem is present in the latest MySQL release.
+ If you encounter a problem, please do not report it as a bug
+ until you have verified that the problem is present in the
+ latest MySQL release.
</para>
</listitem>
@@ -1118,18 +1118,16 @@
can use to connect. This account must be given the
<literal>REPLICATION SLAVE</literal> privilege. If the account
is used only for replication (which is recommended), you don't
- need to grant any additional privileges. (For information
- about setting up user accounts and privileges, see
- <xref linkend="user-account-management"/>.)
+ need to grant any additional privileges.
</para>
<para>
Suppose that your domain is <literal>mydomain.com</literal>
- and you want to create an account with a username of
+ and that you want to create an account with a username of
<literal>repl</literal> such that slave servers can use the
account to access the master server from any host in your
domain using a password of <literal>slavepass</literal>. To
- create the account, this use <literal>GRANT</literal>
+ create the account, use this <literal>GRANT</literal>
statement:
</para>
@@ -1141,7 +1139,7 @@
<para>
If you plan to use the <literal>LOAD TABLE FROM
MASTER</literal> or <literal>LOAD DATA FROM MASTER</literal>
- statements from the slave host, you need to grant this account
+ statements from the slave host, you must grant this account
additional privileges:
</para>
@@ -1158,12 +1156,17 @@
<para>
Grant the <literal>SELECT</literal> privilege for all
tables that you want to load. Any master tables from which
- the account cannot <literal>SELECT</literal> are ignored
- by <literal>LOAD DATA FROM MASTER</literal>.
+ the account cannot <literal>SELECT</literal> will be
+ ignored by <literal>LOAD DATA FROM MASTER</literal>.
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ For additional information about setting up user accounts and
+ privileges, see <xref linkend="user-account-management"/>.
+ </para>
</listitem>
<listitem>
@@ -1177,8 +1180,8 @@
</programlisting>
<para>
- For <literal>InnoDB</literal> tables, note the following:
- <literal>FLUSH TABLES WITH READ LOCK</literal> also blocks
+ For <literal>InnoDB</literal> tables, note that <literal>FLUSH
+ TABLES WITH READ LOCK</literal> also blocks
<literal>COMMIT</literal> operations. When you have acquired a
global read lock, you can start a filesystem snapshot of your
<literal>InnoDB</literal> tables. Internally (inside the
@@ -1254,7 +1257,7 @@
</para>
<programlisting>
-mysql > SHOW MASTER STATUS;
+mysql > <userinput>SHOW MASTER STATUS;</userinput>
+---------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+---------------+----------+--------------+------------------+
@@ -1263,16 +1266,26 @@
</programlisting>
<para>
- The <literal>File</literal> column shows the name of the log,
- while <literal>Position</literal> shows the offset. In this
- example, the binary log value is
+ The <literal>File</literal> column shows the name of the log
+ and <literal>Position</literal> shows the offset within the
+ file. In this example, the binary log file is
<literal>mysql-bin.003</literal> and the offset is 73. Record
- the values. You need to use them later when you are setting up
- the slave. They represent the replication coordinates at which
- the slave should begin processing new updates from the master.
+ these values. You need them later when you are setting up the
+ slave. They represent the replication coordinates at which the
+ slave should begin processing new updates from the master.
</para>
<para>
+ If the master has been running previously without binary
+ logging enabled, the log name and position values displayed by
+ <literal>SHOW MASTER STATUS</literal> or <command>mysqldump
+ --master-data</command> will be empty. In that case, the
+ values that you need to use later when specifying the slave's
+ log file and position are the empty string
+ (<literal>''</literal>) and <literal>4</literal>.
+ </para>
+
+ <para>
After you have taken the snapshot and recorded the log name
and offset, you can re-enable write activity on the master:
</para>
@@ -1332,16 +1345,6 @@
dump file into your slave. However, this is slower than doing
a binary copy.
</para>
-
- <para>
- If the master has been previously running without
- <option>--log-bin</option> enabled, the log name and position
- values displayed by <literal>SHOW MASTER STATUS</literal> or
- <command>mysqldump --master-data</command> are empty. In that
- case, the values that you need to use later when specifying
- the slave's log file and position are the empty string
- (<literal>''</literal>) and <literal>4</literal>.
- </para>
</listitem>
<listitem>
@@ -1349,10 +1352,11 @@
Make sure that the <literal>[mysqld]</literal> section of the
<filename>my.cnf</filename> file on the master host includes a
<literal>log-bin</literal> option. The section should also
- have a <literal>server-id=master_id</literal> option, where
- <literal>master_id</literal> must be a positive integer value
- from 1 to 2<superscript>32</superscript> − 1. For
- example:
+ have a
+ <literal>server-id=<replaceable>master_id</replaceable></literal>
+ option, where <replaceable>master_id</replaceable> must be a
+ positive integer value from 1 to
+ 2<superscript>32</superscript> − 1. For example:
</para>
<programlisting>
@@ -1363,26 +1367,36 @@
<para>
If those options are not present, add them and restart the
- server.
+ server. The server cannot act as a replication master unless
+ binary logging is enabled.
</para>
+
+ <para>
+ Note: For the greatest possible durability and consistency in
+ a replication setup using <literal>InnoDB</literal> with
+ transactions, you should use
+ <literal>innodb_flush_log_at_trx_commit=1</literal> and
+ <literal>sync_binlog=1</literal> in the master
+ <filename>my.cnf</filename> file.
+ </para>
</listitem>
<listitem>
<para>
- Stop the server that is to be used as a slave server and add
- the following to its <filename>my.cnf</filename> file:
+ Stop the server that is to be used as a slave and add the
+ following lines to its <filename>my.cnf</filename> file:
</para>
<programlisting>
[mysqld]
-server-id=slave_id
+server-id=<replaceable>slave_id</replaceable>
</programlisting>
<para>
- The <literal>slave_id</literal> value, like the
- <literal>master_id</literal> value, must be a positive integer
- value from 1 to 2<superscript>32</superscript> − 1. In
- addition, it is very important that the ID of the slave be
+ The <replaceable>slave_id</replaceable> value, like the
+ <replaceable>master_id</replaceable> value, must be a positive
+ integer value from 1 to 2<superscript>32</superscript> −
+ 1. In addition, it is necessary that the ID of the slave be
different from the ID of the master. For example:
</para>
@@ -1417,14 +1431,14 @@
If you made a binary backup of the master server's data, copy
it to the slave server's data directory before starting the
slave. Make sure that the privileges on the files and
- directories are correct. The user that the server MySQL runs
- as must able to read and write the files, just as on the
- master.
+ directories are correct. The system account that you use to
+ run the slave server must be able to read and write the files,
+ just as on the master.
</para>
<para>
If you made a backup using <command>mysqldump</command>, start
- the slave first (see next step).
+ the slave first. The dump file is loaded in a later step.
</para>
</listitem>
@@ -1435,11 +1449,11 @@
<option>--skip-slave-start</option> option so that it doesn't
immediately try to connect to its master. You also may want to
start the slave server with the
- <option>--log-warnings</option> option (enabled by default),
- to get more messages in the error log about problems (for
- example, network or connection problems). Aborted connections
- are not logged to the error log unless the value is greater
- than <literal>1</literal>.
+ <option>--log-warnings</option> option to get more messages in
+ the error log about problems (for example, network or
+ connection problems). The option is enabled by default, but
+ aborted connections are not logged to the error log unless the
+ option value is greater than 1.
</para>
</listitem>
@@ -1463,11 +1477,11 @@
<programlisting>
mysql> <userinput>CHANGE MASTER TO</userinput>
- -> <userinput>MASTER_HOST='master_host_name',</userinput>
- -> <userinput>MASTER_USER='replication_user_name',</userinput>
- -> <userinput>MASTER_PASSWORD='replication_password',</userinput>
- -> <userinput>MASTER_LOG_FILE='recorded_log_file_name',</userinput>
- -> <userinput>MASTER_LOG_POS=recorded_log_position;</userinput>
+ -> <userinput>MASTER_HOST='<replaceable>master_host_name</replaceable>',</userinput>
+ -> <userinput>MASTER_USER='<replaceable>replication_user_name</replaceable>',</userinput>
+ -> <userinput>MASTER_PASSWORD='<replaceable>replication_password</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_FILE='<replaceable>recorded_log_file_name</replaceable>',</userinput>
+ -> <userinput>MASTER_LOG_POS=<replaceable>recorded_log_position</replaceable>;</userinput>
</programlisting>
<para>
@@ -1565,15 +1579,6 @@
the same one for each slave.
</para>
- <para>
- Note: For the greatest possible durability and consistency in a
- replication setup using <literal>InnoDB</literal> with
- transactions you should use
- <literal>innodb_flush_log_at_trx_commit=1</literal> and
- <literal>sync_binlog=1</literal> in the master
- <filename>my.cnf</filename> file.
- </para>
-
</section>
<section id="replication-compatibility">
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r1111 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 29 Jan |