Direct the slave to use the master-opracowanie

Nasza ocena:

3
Wyświetleń: 364
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Direct the slave to use the master-opracowanie - strona 1

Fragment notatki:

Direct the slave to use the master. Instruct the slave to use the master as the replication
data source, and to use GTID-based auto-positioning rather than file-based positioning. You can do
this by executing a CHANGE MASTER TO statement on the slave, using the MASTER_AUTO_POSITION
option to tell the slave that transactions will be identified by GTIDs.
You may also need to supply appropriate values for the master's host name and port number as well as
the user name and password for a replication user account which can be used by the slave to connect
to the master; if these have already been set prior to Step 1 and no further changes need to be made,
the corresponding options can safely be omitted from the statement shown here.
mysql CHANGE MASTER TO
MASTER_HOST = host,
MASTER_PORT = port,
MASTER_USER = user,
MASTER_PASSWORD = password,
MASTER_AUTO_POSITION = 1;
Neither the MASTER_LOG_FILE option nor the MASTER_LOG_POS option may be used with
MASTER_AUTO_POSITION set equal to 1. Attempting to do so causes the CHANGE MASTER
TO statement to fail with an error. (If you need to revert from GTID-based replication to
replication based on files and positions, you must use one or both of these options together with
MASTER_AUTO_POSITION = 0 in the CHANGE MASTER TO statement.)
Assuming that the CHANGE MASTER TO statement has succeeded, you can then start the slave, like
this:
mysql START SLAVE;
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz