1

我即将为我的typo3数据库做一个MySQL复制。有两台服务器。你猜对了,一个是主,一个是奴隶。MySQL复制主从

大师的my.cnf:
[mysql]
server-id = 1
log-bin
expire_logs_days = 21
max_binlog_size = 500M
binlog-ignore-db=mysql

从my.cnf文件:[email protected] REPLICATION SLAVE, REPLICATION CLIENT
用户奴隶:
[mysql]
server-id = 2
binlog-ignore-db = mysql
replicate-ignore-db = mysql
auto-increment-offset = 1
expire_logs_days = 21
max_binlog_size = 500M

上的主用户[email protected] REPLICATION SLAVE, REPLICATION CLIENT

到目前为止一切正常,即使我在Master上改变了一些东西,但是如果我在Master上删除了同样的东西,Slave也会以这个错误结束或消息:

Last_SQL_Error: Error 'Duplicate entry '65021' for key 'PRIMARY'' on query. Default database: 'typo3'. Query: 'INSERT INTO sys_log (userid,type,action,error,details_nr,details,IP,tstamp,workspace) VALUES ('0','5','0','2','0','Core: Exception handler (WEB): Uncaught TYPO3 Exception: Reason: Segment &quot;404&quot; was not a keyword for a postVarSet as expected on page with id=0.<br />\n<br />\nAdditionally, http://www.21cdocs.de/404/ was not found while trying to retrieve the error document. | RuntimeException thrown in file /mnt/platte02/www/typo3/typo3_src-4.5.19/typo3/sysext/cms/tslib/class.tslib_fe.php in line 1542','masterip','1351240603','0')'

这是show slave status\G表明了我。

任何解决方案如何强制奴隶覆盖一切它与硕士数据?

- 蒂莫

回答

0

随着slave-skip-errors = 1062它跳过错误,但是这不是在我看来

更新一个很好的解决方案:明明Typo3的是做对sys_log表中的一些错误。