Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. -- create a root user at 192.168.11.0/24
  2. CREATE USER 'root'@'192.168.11.%' IDENTIFIED BY 'some_pass';
  3. GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
  4.  
  5. -- create a replication user
  6. CREATE USER repl_user;
  7. GRANT REPLICATION SLAVE ON *.* TO repl_user IDENTIFIED BY 'some_pass';
  8.  
  9. -- start reolication on slave
  10. CHANGE MASTER TO MASTER_HOST = 'master', MASTER_PORT = 3306, MASTER_USER = 'repl_user', MASTER_PASSWORD = 'some_pass';
  11. START SLAVE;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement