Guest User

Untitled

a guest
Feb 1st, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. [MYSQLD]
  2. binlog-format=ROW
  3. log-bin=binlog
  4. server-id=1
  5.  
  6. CREATE USER 'rep'@'ip slave' IDENTIFIED BY 'pass';
  7. GRANT REPLICATION SLAVE ON *.* TO 'rep'@'ip slave';
  8. FLUSH PRIVILEGES;
  9.  
  10. [MYSQLD]
  11. binlog-format=ROW
  12. log-bin=binlog
  13. server-id=2
  14.  
  15. CHANGE MASTER TO MASTER_HOST='ip master',MASTER_USER='rep', MASTER_PASSWORD='pass', MASTER_LOG_FILE='binlog.000003';
  16.  
  17.  
  18. MariaDB [(none)]> SHOW SLAVE STATUS G;
  19. *************************** 1. row ***************************
  20. Slave_IO_State: Waiting for master to send event
  21. Master_Host: 192.168.231.102
  22. Master_User: repp
  23. Master_Port: 3306
  24. Connect_Retry: 60
  25. Master_Log_File: binlog.000014
  26. Read_Master_Log_Pos: 3728
  27. Relay_Log_File: db2-relay-bin.000017
  28. Relay_Log_Pos: 552
  29. Relay_Master_Log_File: binlog.000014
  30. Slave_IO_Running: Yes
  31. Slave_SQL_Running: Yes
  32. Replicate_Do_DB:
  33. Replicate_Ignore_DB:
  34. Replicate_Do_Table:
  35. Replicate_Ignore_Table:
  36. Replicate_Wild_Do_Table:
  37. Replicate_Wild_Ignore_Table:
  38. Last_Errno: 0
  39. Last_Error:
  40. Skip_Counter: 0
  41. Exec_Master_Log_Pos: 3728
  42. Relay_Log_Space: 1155
  43. Until_Condition: None
  44. Until_Log_File:
  45. Until_Log_Pos: 0
  46. Master_SSL_Allowed: No
  47. Master_SSL_CA_File:
  48. Master_SSL_CA_Path:
  49. Master_SSL_Cert:
  50. Master_SSL_Cipher:
  51. Master_SSL_Key:
  52. Seconds_Behind_Master: 0
  53. Master_SSL_Verify_Server_Cert: No
  54. Last_IO_Errno: 0
  55. Last_IO_Error:
  56. Last_SQL_Errno: 0
  57. Last_SQL_Error:
  58. Replicate_Ignore_Server_Ids:
  59. Master_Server_Id: 1
  60. Master_SSL_Crl:
  61. Master_SSL_Crlpath:
  62. Using_Gtid: No
  63. Gtid_IO_Pos:
  64. Replicate_Do_Domain_Ids:
  65. Replicate_Ignore_Domain_Ids:
  66. Parallel_Mode: conservative
  67. SQL_Delay: 0
  68. SQL_Remaining_Delay: NULL
  69. Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
  70. 1 row in set (0.00 sec)
Add Comment
Please, Sign In to add comment