Advertisement
Guest User

Untitled

a guest
Apr 20th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. TheMaster|mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'$slaveip' IDENTIFIED BY '$slavepass';
  2. TheMaster|mysql> FLUSH PRIVILEGES;
  3.  
  4. TheSlave$ mysql --host=TheMaster --user=repl --password=$slavepass
  5. TheSlave|mysql> SHOW GRANTS;
  6. +------------------------------------------------------------+
  7. | Grants for repl@$slaveip |
  8. +------------------------------------------------------------+
  9. | GRANT REPLICATION SLAVE ON *.* TO 'repl'@'$slaveip' |
  10. +------------------------------------------------------------+
  11. 1 row in set (0.01 sec)
  12.  
  13. server_id = 2
  14.  
  15. TheSlave|mysql> CHANGE MASTER TO
  16. MASTER_HOST='$masterip',
  17. MASTER_USER='repl',
  18. MASTER_PASSWORD='$slavepass',
  19. MASTER_LOG_FILE='TheMaster-bin.000001',
  20. MASTER_LOG_POS=481;
  21.  
  22. TheSlave|mysql> START SLAVE;
  23.  
  24. TheSlave|mysql> SHOW SLAVE STATUS G
  25. ...
  26. Slave_IO_Running: Yes
  27. Slave_SQL_Running: Yes
  28. ...
  29. Seconds_Behind_Master: 13
  30. ...
  31.  
  32. 2016-04-20T18:11:34.896095Z 20955 [Note] Access denied for user 'root'@'localhost' (using password: NO)
  33. 2016-04-20T18:11:34.896580Z 20956 [Note] Access denied for user 'root'@'localhost' (using password: NO)
  34. 2016-04-20T18:11:34.896982Z 20957 [Note] Access denied for user 'root'@'localhost' (using password: NO)
  35. 2016-04-20T18:11:34.897401Z 20958 [Note] Access denied for user 'root'@'localhost' (using password: NO)
  36. 2016-04-20T18:11:34.901181Z 20959 [Note] Access denied for user 'root'@'localhost' (using password: NO)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement