Guest User

Untitled

a guest
Oct 27th, 2017
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. ssh -L 13306:localhost:3306 -p 22111 admin@M1 -f -N
  2.  
  3. CREATE USER 'replication'@'127.0.0.1' identified by 'xxxx';
  4. GRANT REPLICATION SLAVE on *.* to 'replication'@'127.0.0.1' REQUIRE SSL;
  5.  
  6. mysql -u replication -pxxxx -h 127.0.0.1 --protocol=TCP -P 13306
  7.  
  8. CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='replication', MASTER_PASSWORD='xxxx', MASTER_PORT=13306, MASTER_LOG_FILE='mysql-bin.000022', MASTER_LOG_POS=9164599, MASTER_SSL=1, MASTER_SSL_CA='/etc/tls/ca-cert.pem', MASTER_SSL_CERT='/etc/tls/client-cert.pem', MASTER_SSL_KEY='/etc/tls/client-key.pem', MASTER_CONNECT_RETRY=10;
  9. START SLAVE;
  10. SHOW SLAVE STATUS G
  11. *************************** 1. row ***************************
  12. Slave_IO_State: Connecting to master
  13. Master_Host: 127.0.0.1
  14. Master_User: replication
  15. Master_Port: 13306
  16. Connect_Retry: 10
  17. Master_Log_File: mysql-bin.000022
  18. Read_Master_Log_Pos: 9164599
  19. Relay_Log_File: mysqld-relay-bin.000002
  20. Relay_Log_Pos: 4
  21. Relay_Master_Log_File: mysql-bin.000022
  22. Slave_IO_Running: Connecting
  23. Slave_SQL_Running: Yes
  24. Replicate_Do_DB:
  25. Replicate_Ignore_DB:
  26. Replicate_Do_Table:
  27. Replicate_Ignore_Table:
  28. Replicate_Wild_Do_Table:
  29. Replicate_Wild_Ignore_Table:
  30. Last_Errno: 0
  31. Last_Error:
  32. Skip_Counter: 0
  33. Exec_Master_Log_Pos: 9164599
  34. Relay_Log_Space: 249
  35. Until_Condition: None
  36. Until_Log_File:
  37. Until_Log_Pos: 0
  38. Master_SSL_Allowed: Yes
  39. Master_SSL_CA_File: /etc/tls/ca-cert.pem
  40. Master_SSL_CA_Path:
  41. Master_SSL_Cert: /etc/tls/client-cert.pem
  42. Master_SSL_Cipher:
  43. Master_SSL_Key: /etc/tls/client-key.pem
  44. Seconds_Behind_Master: NULL
  45. Master_SSL_Verify_Server_Cert: No
  46. Last_IO_Errno: 2003
  47. Last_IO_Error: error connecting to master 'ubi_replication@127.0.0.1:13306' - retry-time: 10 retries: 86400 message: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")
  48. Last_SQL_Errno: 0
  49. Last_SQL_Error:
  50. Replicate_Ignore_Server_Ids:
  51. Master_Server_Id: 0
  52. Master_SSL_Crl: /etc/tls/ca-cert.pem
  53. Master_SSL_Crlpath:
  54. Using_Gtid: No
  55. Gtid_IO_Pos:
  56. Replicate_Do_Domain_Ids:
  57. Replicate_Ignore_Domain_Ids:
  58. Parallel_Mode: conservative
  59. 1 row in set (0.00 sec)
Add Comment
Please, Sign In to add comment