2016-06-13 2 views
0

누군가가 나를 단계별로 다중 소스 복제를 만드는 방법을 쓸 수 있습니까? 나는 그것에 대해 많은 정보를 읽었지만 나는 gtid 모드에 문제가있다. 나는 마스터 컴퓨터에서 my.ini 파일의 gtid-mode를 켰지 만, 데이터베이스에 덤프를 만들 때 gtid를 실행할 때 오류가 발생하여 비어 있어야합니다.MySQL의 다중 소스 복제

+0

전체 오류 및 'my.ini' 파일을 게시 해주십시오. –

답변

0

10:53:52 복원 중 C : \ Users \ KasiSTD \ Desktop \ master3-1.sql 실행 중 : mysql.exe --defaults-file = "c : \ users \ kasistd \ appdata \ local \ temp \ tmpmw0avv .cnf "--protocol = tcp --host = localhost --user = root --port = 3306 --default-character-set = utf8-comments <"C : \ Users \ KasiSTD \ Desktop \ master3-1. sql "26 행의 ERROR 1840 (HY000) : @@ GLOBAL.GTID_PURGED는 @@ GLOBAL.GTID_EXECUTED가 비어있는 경우에만 설정할 수 있습니다. 작업이 exitcode 1로 실패했습니다. 10:53:53 C : \ Users \ KasiSTD \ Desktop \ master3-1.sql의 가져 오기가 1 개의 오류로 끝났습니다.

백업 파일을 가져올 때이 오류가 발생합니다.

이것은 [mysqld] log-bin = mysql-bin binlog-do-db = master3 auto_increment_increment = 2 gtid-mode = on enforce-gtid-consistency = 1의 my.ini 파일 변경 사항입니다. 서버 ID server-id = 4

+0

은 덤프 파일을로드하기 전에 슬레이브에서 RESET MASTER를 실행합니다. – malyy

0

시도는 실행할 : 채널

slave> reset master; 
slave> source dump.sql; 
slave> start slave; 
slave> show slave statusG 
[...] 
Slave_IO_Running: Yes 
Slave_SQL_Running: Yes 
[...] 
+0

내가 소스를 열려고 할 때 : '\ mysql \ gtid_executed.frm'파일의 잘못된 정보 –

+0

나는 gtid_executed를 사용하여 gtid_purged를 사용하고 Retrieved_Gtid_SET을 설정하는 방법을 모른다 : –

+0

당신은 gtid- 모드가 활성화 되었습니까? – malyy

0

의 MySQL> 쇼 슬레이브 상태 'master-joro'\ G ************************** 1. 행 ************ *************** Slave_IO_State : 마스터에 연결 MASTER_HOST : 192.168.1.62 Master_User : joro MASTER_PORT : 3306 Connect_Retry : 60 MASTER_LOG_FILE한다 : mysql-bin.000003 Read_Master_Log_Pos : 1066 RELAY_LOG_FILE : [email protected] RELAY_LOG_POS : 4 Relay_Master_Log_File : mysql을-bin.000003 Slave_IO_Running : Slave_SQL_Running 연결 : 예 Replicate_Do_DB : 아이디, MASTER2, final_repl Replicate_Ignore _db : Replicate_Do_Table : Replicate_Ignore_Table : Replicate_Wild_Do_Table : Replicate_Wild_Ignore_Table : Last_Errno : 0 만약 Last_Error : Skip_Counter : 0 Exec_Master_Log_Pos 1066 Relay_Log_Space 154 Until_Condition : 없음 Until_Log_File : Until_Log_Pos : 0 Master_SSL_Allowed 없음 Master_SSL_CA_File : Master_SSL_CA_Path : Master_SSL_Cert : Master_SSL_Cipher : Master_SSL_Key : Seconds_Behind_Master은 : NULL Master_SSL_Verify_Server_Cert : 없음 Last_IO_Errno : 0 Last_IO_Error : Last_SQL_Errno : 0 Last_SQL_Error : Replicate_Ignore_Server_Ids : Master_Server_Id : 0 Master_UUID : Master_Info_File : MySQL은.slave_master_info SQL_Delay : 0 SQL_Remaining_Delay : NULL Slave_SQL_Running_State : 슬레이브가 모든 릴레이 로그를 읽었습니다. 보다 최대 날짜를 기다리고 Master_Retry_Count : 86400 Master_Bind : Last_IO_Error_Timestamp : Last_SQL_Error_Timestamp : Master_SSL_Crl : Master_SSL_Crlpath : Retrieved_Gtid_Set : Executed_Gtid_Set : 2069dbc8-2c85-11e6-b4ce-0027136c5f75 : 1 Auto_Position : 0 Replicate_Rewrite_DB : 채널 _ 이름 : master-joro Master_TLS_Version : 행이 1 세트 (0.00 초)