Saya memiliki dua server mysql, satu master dan satu slave.
Seseorang pergi ke budak dan membuat tabel, lalu pergi ke master dan membuat tabel yang sama. Tentu saja pernyataan DDL ini direplikasi ke slave, menyebabkan kesalahan, menyebabkan replikasi berhenti pada titik kesalahan.
Bagaimana saya harus memulai kembali proses replikasi setelah menjatuhkan tabel pada slave atau memulai replikasi setelah pernyataan itu?
tampilkan output status slave:
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: xx.xx.xx.xx
Master_User: buildbot
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.024536
Read_Master_Log_Pos: 33489509
Relay_Log_File: mysqld-relay-bin.049047
Relay_Log_Pos: 32575097
Relay_Master_Log_File: mysql-bin.024476
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1050
Last_Error: Error 'Table 'checklist' already exists' on query. Default database: 'dbname'. Query: 'CREATE TABLE `checklist` (
`checklist_id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(768) NOT NULL,
`url` varchar(512) NOT NULL,
`active` bit(1) NOT NULL,
`insert_date` datetime NOT NULL,
`xcred` int(11) NOT NULL,
PRIMARY KEY (`checklist_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1'
Skip_Counter: 0
Exec_Master_Log_Pos: 32574952
Relay_Log_Space: 6766519525
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
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: No
Last_IO_Errno: 2013
Last_IO_Error: error reconnecting to master 'user@xx.xx.xx.xx:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 1050
Last_SQL_Error: Error 'Table 'checklist' already exists' on query. Default database: 'dbname'. Query: 'CREATE TABLE `checklist` (
`checklist_id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(768) NOT NULL,
`url` varchar(512) NOT NULL,
`active` bit(1) NOT NULL,
`insert_date` datetime NOT NULL,
`xcred` int(11) NOT NULL,
PRIMARY KEY (`checklist_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1'