Skip to content

Instantly share code, notes, and snippets.

@xuechong87
Created November 11, 2013 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuechong87/7407206 to your computer and use it in GitHub Desktop.
Save xuechong87/7407206 to your computer and use it in GitHub Desktop.
mysql slave
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