Hi,
Jen mlists wrote:
Hello members,
One of our master dbs didn't have binlog enabled.But I need to do
replication on it.
So I add the lines,
[mysqld]
log-bin
server-id=1
in /etc/my.cnf and restart mysqld.Then I follow the general operation
to do the master/slave replication.
My question is,I only enable binlog before the replication
operation,is it too late?
Because I saw the replication had problems when I START SLAVE on slave
mysqld,the error message is:
Are you sure the master and slave had the same data at the time you started the
slave replicating from the master? It looks to me like the slave had different
data and you need to re-initialize the slave.
You may be able to use mysql-table-checksum and mysql-table-sync to synchronize
the slave with the master without completely re-snapshotting it from the master,
if that is an issue. (http://mysqltoolkit.sourceforge.net)
070717 5:12:22 Slave SQL thread initialized, starting replication in
log 'GZDB1-bin.149' at position 103420, relay log
'./mysqlrep-relay-bin.001' position: 44
ERROR: 1062 Duplicate entry '62858' for key 1
070717 5:12:22 Slave: Error 'Duplicate entry '62858' for key 1' on
query. Default database: 'movie'. Query: 'INSERT INTO
v_movie_search_results
(userid,condition,keyword,results,dateline,expiry)
VALUES
('0','a:3:{s:9:\"condition\";a:0:{}s:10:\"condition2\";a:4:{i:0;s:48:\"
m.movieid IN (0,13097,39357,43318,47080,47081) \";i:1;s:19:\"
m.vnet_status=\'3\' \";i:2;s:17:\" m.importance<>1 \";i:3;s:95:\"
m.type IN
(\'movie\',\'music_live\',\'special_cartoon\',\'special_mtv\',\'special_tv\',\'special_movie\')
\";}s:10:\"condition3\";a:1:{i:0;s:12:\"xx:
xxx\";}}','','a:3:{s:5:\"total\";s:1:\"3\";s:8:\"movieids\";s:17:\"47081,47080,39357\";s:9:\"condition\";a:3:{s:9:\"condition\";a:0:{}s:10:\"condition2\";a:4:{i:0;s:48:\"
m.movieid IN (0,13097,39357,43318,47080,47081) \";i:1;s:19:\"
m.vnet_status=\'3\' \";i:2;s:17:\" m.importance<>1 \";i:3;s:95:\"
m.type IN
(\'movie\',\'music_live\',\'special_cartoon\',\'special_mtv\',\'special_tv\',\'special_movie\')
\";}s:10:\"condition3\";a:1:{i:0;s:12:\"xx: xxx\";}}}','118',
Error_code: 1062
070717 5:12:22 Error running query, slave SQL thread aborted. Fix
the problem, and restart the slave SQL thread with "SLAVE START". We
stopped at log 'GZDB1-bin.149' position 103420
Both master and slave are mysql-4.0.20.Due to the history reasons,they
don't like to use new version,no way.
Please help me,thanks.
--jen
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]