Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. Slave_IO_State: Waiting for master to send event
  2. Master_Host: xxx.xxx.xxx.xxx
  3. Master_User: username
  4. Master_Port: 3306
  5. Connect_Retry: 10
  6. Master_Log_File: mysql-bin.000030
  7. Read_Master_Log_Pos: 326
  8. Relay_Log_File: mysql-relay-bin.000002
  9. Relay_Log_Pos: 253
  10. Relay_Master_Log_File: mysql-bin.000029
  11. Slave_IO_Running: Yes
  12. Slave_SQL_Running: No
  13. Replicate_Do_DB:
  14. Replicate_Ignore_DB:
  15. Replicate_Do_Table:
  16. Replicate_Ignore_Table:
  17. Replicate_Wild_Do_Table:
  18. Replicate_Wild_Ignore_Table:
  19. Last_Errno: 1051
  20. Last_Error: Error 'Unknown table 'Test'' on query. Default database: 'FOOD'. Query: 'DROP TABLE `Test` /* generated by server */'
  21. Skip_Counter: 0
  22. Exec_Master_Log_Pos: 1410
  23. Relay_Log_Space: 2176
  24. Until_Condition: None
  25. Until_Log_File:
  26. Until_Log_Pos: 0
  27. Master_SSL_Allowed: No
  28. Master_SSL_CA_File:
  29. Master_SSL_CA_Path:
  30. Master_SSL_Cert:
  31. Master_SSL_Cipher:
  32. Master_SSL_Key:
  33. Seconds_Behind_Master: NULL
  34. Master_SSL_Verify_Server_Cert: No
  35. Last_IO_Errno: 0
  36. Last_IO_Error:
  37. Last_SQL_Errno: 1051
  38. Last_SQL_Error: Error 'Unknown table 'Test'' on query. Default database: 'FOOD'. Query: 'DROP TABLE `Test` /* generated by server */'
  39. Replicate_Ignore_Server_Ids:
  40. Master_Server_Id: 1
  41.  
  42. 1. Edit my.cnf on Master ->
  43. set server-id = 1
  44. set binlog_do_db = database name
  45. 2. Restart mysql service on Master
  46. 3. Create user for replication:
  47. CREATE USER 'slave'@'master IPv4' IDENTIFIED BY 'password';
  48. 4. Grant replication slave:
  49. GRANT REPLICATION SLAVE ON *.* TO 'slave'@'%';
  50. 5. Restart mysql service on Master
  51.  
  52. 1. Edit my.cnf on Slave ->
  53. set server-id = 2
  54. 2. Restart mysql service on Slave
  55. 3. Stop slave
  56. 4. CHANGE MASTER TO MASTER_HOST='Master IPv4', MASTER_USER='slave', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000029', MASTER_LOG_POS=827;
  57. 5. Start slave
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement