Created
November 11, 2013 03:13
-
-
Save xuechong87/7407206 to your computer and use it in GitHub Desktop.
mysql slave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT REPLICATION SLAVE,REPLICATION CLIENT ON *.* | |
TO repl@'172.16.30.%' IDENTIFIED BY '123'; | |
--zhu | |
log_bin = mysql-bin | |
server_id= | |
--bei | |
log_bin = mysql-bin | |
server_id= | |
relay_log=/var/lib/mysql/mysql-relay-bin | |
log_slave_updates=1 | |
read_only=1 | |
--bei | |
CHANGE MASTER TO MASTER_HOST='172.16.30.131', | |
MASTER_USER = 'repl', | |
MASTER_PASSWORD='123', | |
MASTER_LOG_FILE='mysql-bin.0000002', | |
MASTER_LOG_POS=0; | |
SHOW SLAVE STATUS ; | |
START SLAVE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment