主库:
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'10.0.0.1' IDENTIFIED BY 'password';
flush privileges;
从库:
CHANGE MASTER TO MASTER_HOST='10.0.0.1',master_user='repl',master_password='password',MASTER_LOG_FILE='mysql-bin.000152', MASTER_LOG_POS=1;
start slave;
show slave status\G;