1
votes

I am about to do a MySQL replication for my typo3 Database. There are two servers. You guessed it one is the Master and one is the Slave.

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

Slave 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

User on Master: repl@slaveip REPLICATION SLAVE, REPLICATION CLIENT
User on Slave: repl@masterip REPLICATION SLAVE, REPLICATION CLIENT

So far everything works, even if I change something on Master but if I delete the same thing on Master, Slave stops with this error message:

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')'

This is what show slave status\G shows me.

Any solutions how I force the Slave to override everything on it with Masters data?

- Timo

1

1 Answers

0
votes

With slave-skip-errors = 1062 it skips the error but this isn't a good solution in my opinion

Update: obviously Typo3 is doing some mistakes on the sys_log table.