首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MySQL复制母版-从

问MySQL复制母版-从
EN

Stack Overflow用户
提问于 2012-10-26 08:44:16
回答 1查看 1.1K关注 0票数 1

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

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上更改了某些内容,但是如果我删除了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给我看的。

有什么解决方案吗?我如何强迫奴隶用母版数据覆盖上面的所有内容?

  • 蒂莫
EN

回答 1

Stack Overflow用户

发布于 2012-10-26 10:20:31

对于slave-skip-errors = 1062,它跳过了错误,但在我看来,这不是一个好的解决方案

Update:很明显,Typo3在sys_log表上做了一些错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13083617

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档