Commit 78f7befa authored by monty@donna.mysql.com's avatar monty@donna.mysql.com

cleanups

parent 4de5ac33
...@@ -25563,12 +25563,13 @@ system: ...@@ -25563,12 +25563,13 @@ system:
@itemize @bullet @itemize @bullet
@item @item
Upgrade both slave and master to Version 3.23.15 or higher. We recommend that Upgrade both slave and master to Version 3.23.15 or higher. We recommend
you always use the latest release of Version 3.23 on both the slave and the that you always use the latest release of Version 3.23 on both the slave
master. While Version 3.23 is in beta, the versions may be not backwards and the master. The binary log format has also changed a couple of times
compatible. In addition, the newer version will fix some bugs and add during development (before 3.23.29) so you should delete old binary logs
new features. Please, do not report bugs until you have verified that when upgrading @strong{MySQL}. In addition, the newer version will fix
the problem is present in the latest release. some bugs and add new features. Please, do not report bugs until you
have verified that the problem is present in the latest release.
@item @item
Set up special replication user(s) on the master with the @code{FILE} Set up special replication user(s) on the master with the @code{FILE}
privilege and permission to connect from all the slaves. If the user is privilege and permission to connect from all the slaves. If the user is
...@@ -25576,16 +25577,18 @@ only doing replication, you don't need to grant him other privileges. ...@@ -25576,16 +25577,18 @@ only doing replication, you don't need to grant him other privileges.
@item @item
Take a snapshot of all the tables/databases on the master that could Take a snapshot of all the tables/databases on the master that could
possibly be involved in the update queries before taking the next step. possibly be involved in the update queries before taking the next step.
Starting in Version 3.23.21, there is a command that allows you to Starting in Version 3.23.21, there is a command that allows you to take
take a snapshot of a table on the master and copy it to the slave, called a snapshot of a table on the master and copy it to the slave, called
@code{LOAD TABLE FROM MASTER}. Until Version 3.23.23, though, it has a serious @code{LOAD TABLE FROM MASTER}. Until Version 3.23.23, though, it has a
bug, and we recommend that you do not use it until you have upgraded. serious bug, and we recommend that you do not use it until you have
upgraded.
@item @item
In @code{my.cnf} on the master add @code{log-bin} and restart it. Make In @code{my.cnf} on the master add @code{log-bin} and
sure there are no important updates to the master between the time you @code{server-id=unique number} and restart it. Make sure there are no
have taken the snapshot and the time the master is restarted with important updates to the master between the time you have taken the
@code{log-bin} option. snapshot and the time the master is restarted with @code{log-bin}
option.
@item @item
Load the snapshot of the master to all the slaves. Load the snapshot of the master to all the slaves.
@item @item
...@@ -25595,17 +25598,11 @@ Add the following to @code{my.cnf} on the slave(s): ...@@ -25595,17 +25598,11 @@ Add the following to @code{my.cnf} on the slave(s):
master-host=<hostname of the master> master-host=<hostname of the master>
master-user=<replication user name> master-user=<replication user name>
master-password=<replication user password> master-password=<replication user password>
server-id=<some unique number between 1 and 2^32-1>
@end example @end example
replacing the values in <> with what is relevant to your system. replacing the values in <> with what is relevant to your system.
Starting in Version 3.23.26, you must also have on both master and
slave
@example
server-id=<some unique number between 1 and 2^32-1>
@end example
@code{server-id} must be different for each server participating in @code{server-id} must be different for each server participating in
replication. If you don't specify a server-id, it will be set to replication. If you don't specify a server-id, it will be set to
1 if you have not defined @code{master-host}, else it will be set to 2. 1 if you have not defined @code{master-host}, else it will be set to 2.
...@@ -25617,6 +25614,17 @@ replication. If you don't specify a server-id, it will be set to ...@@ -25617,6 +25614,17 @@ replication. If you don't specify a server-id, it will be set to
After you have done the above, the master and the slave(s) should be in After you have done the above, the master and the slave(s) should be in
sync. sync.
If you have forgot to set server-id for the slave you will get the following
error in the error log file:
@example
Warning: one should set server_id to a non-0 value if master_host is set.
The server will not act as a slave.
@end example
If you have forgot to do this for the master, the slaves will not be able to
connect to the master.
@cindex options, replication @cindex options, replication
@cindex @code{my.cnf} file @cindex @code{my.cnf} file
@cindex files,@code{my.cnf} @cindex files,@code{my.cnf}
...@@ -33672,7 +33680,7 @@ Drop or rename @code{old_table}. ...@@ -33672,7 +33680,7 @@ Drop or rename @code{old_table}.
@cindex replication @cindex replication
@menu @menu
* Log Replication:: Database replication with update log * Log Replication:: Database replication with update log
* Backup:: Database backups * Backup:: Database backups
* Update log:: The update log * Update log:: The update log
* Binary log:: The binary log * Binary log:: The binary log
...@@ -33689,12 +33697,13 @@ Now that master-slave internal replication is available starting in ...@@ -33689,12 +33697,13 @@ Now that master-slave internal replication is available starting in
Version 3.23.15, this is the recommended way. @xref{Replication}. Version 3.23.15, this is the recommended way. @xref{Replication}.
However, it is still possible to replicate a database by using the However, it is still possible to replicate a database by using the
update log. @xref{Update log}. This requires one database that acts as a update log or the binary log. @xref{Update log}. This requires one
master (to which data changes are made) and one or more other databases database that acts as a master (to which data changes are made) and one
that act as slaves. To update a slave, just run @code{mysql < or more other databases that act as slaves. To update a slave, just run
update_log}. Supply host, user, and password options that are @code{mysql < update_log.*} or @code{mysqlbinlog binary_log.* | mysql}.
appropriate for the slave database, and use the update log from the Supply host, user, and password options that are appropriate for the
master database as input. slave database, and use the update log from the master database as
input.
If you never delete anything from a table, you can use a @code{TIMESTAMP} If you never delete anything from a table, you can use a @code{TIMESTAMP}
column to find out which rows have been inserted or changed in the table column to find out which rows have been inserted or changed in the table
...@@ -33788,6 +33797,10 @@ a unique key value. ...@@ -33788,6 +33797,10 @@ a unique key value.
@node Update log, Binary log, Backup, Common problems @node Update log, Binary log, Backup, Common problems
@section The Update Log @section The Update Log
@strong{NOTE}: The update log is replaced by the binary
log. @xref{Binary log}. With this you can do anything that you can do
with the update log.
When started with the @code{--log-update[=file_name]} option, When started with the @code{--log-update[=file_name]} option,
@code{mysqld} writes a log file containing all SQL commands that update @code{mysqld} writes a log file containing all SQL commands that update
data. If no filename is given, it defaults to the name of the host data. If no filename is given, it defaults to the name of the host
...@@ -40057,6 +40070,9 @@ though, so Version 3.23 is not released as a stable version yet. ...@@ -40057,6 +40070,9 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.30 @appendixsubsec Changes in release 3.23.30
@itemize @bullet @itemize @bullet
@item @item
Changed BDB tables to not use internal subtransactions and reuse open files to
get more speed.
@item
Added option @code{--mysqld=#} to @code{safe_mysqld} Added option @code{--mysqld=#} to @code{safe_mysqld}
@item @item
Allow hex constants in the @code{--fields-*-by} and Allow hex constants in the @code{--fields-*-by} and
...@@ -1626,14 +1626,14 @@ int main(int argc, char **argv) ...@@ -1626,14 +1626,14 @@ int main(int argc, char **argv)
#ifdef EXTRA_DEBUG #ifdef EXTRA_DEBUG
case 1: case 1:
sql_print_error("\ sql_print_error("\
Warning: one should set server_id to a non-0 value if log-bin is enabled.\n\ Warning: one should set server-id to a non-0 value if log-bin is enabled.\n\
Will log updates to binary log, but will not accept connections from slaves"); Will log updates to binary log, but will not accept connections from slaves.");
break; break;
#endif #endif
case 2: case 2:
sql_print_error("\ sql_print_error("\
Warning: one should set server_id to a non-0 value if master_host is set.\n\ Warning: one should set server-id to a non-0 value if master_host is set.\n\
The server will not act as a slave"); The server will not act as a slave.");
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment