mysql复制大师



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

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

奴隶my.cnf:
[mysql]
server-id = 2
binlog-ignore-db = mysql
replicate-ignore-db = mysql
auto-increment-offset = 1
expire_logs_days = 21
max_binlog_size = 500M

主人上的用户: repl@slaveip REPLICATION SLAVE, REPLICATION CLIENT
从属上的用户:repl@masterip REPLICATION SLAVE, REPLICATION CLIENT

到目前为止,一切都有效,即使我在主上更改了某些内容,但是如果我在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 statusG向我展示的。

有任何解决方案,我如何强制从掌管用主人数据上覆盖所有东西

-Timo

使用slave-skip-errors = 1062,它跳过了错误,但我认为这不是一个很好的解决方案

update :显然Typo3在SYS_LOG表上犯了一些错误。

最新更新