background image
Part2:基本使用方式
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
[root@HE1 ~]
# mysqlreplicate --help
MySQL Utilities mysqlreplicate version 1.5.4
License
type
: GPLv2
Usage: mysqlreplicate --master=root@localhost:3306 --slave=root@local
host:3310 --rpl-user=rpl:
passwd
mysqlreplicate - establish replication with a master
Options:
--version
show program's version number and
exit
--help
display a help message and
exit
--license
display program's license and
exit
--master=MASTER
connection information
for
master server
in
t
he form:
<user>[:<password>]@<host>[:<port>][:<socket>
] or
<login-path>[:<port>][:<socket>] or <config-
path>[<[group]>].
--slave=SLAVE
connection information
for
slave server
in
th
e form:
<user>[:<password>]@<host>[:<port>][:<socket>
] or
<login-path>[:<port>][:<socket>] or <config-
path>[<[group]>].
--rpl-user=RPL_USER
the user and password
for
the replication use
r
requirement,
in
the form: <user>[:<password>]
or
<login-path>. E.g. rpl:
passwd
-p, --pedantic
fail
if
storage engines differ among master a
nd slave.
--
test
-db=TEST_DB
database name to use
in
testing replication s
etup
(optional)
--master-log-
file
=MASTER_LOG_FILE
use this master log
file
to initiate the slav
e.
--master-log-pos=MASTER_LOG_POS
use this position
in
the master log
file
to i
nitiate
the slave.