Hello.
For auto_increment columns MySQL sets in the binary logs INSERT_ID variable, research binary and relay logs and check if it is set to the same value. Is it possible that you forgot to change the master_log_pos and master_log_file after copying the data to the slave? PaginaDeSpud wrote: > Hi, > Some hours ago i setup the replication for my cluster and it's the third > time i need to reset the replication and copy the whole database from master > to slave due to errors like this: > > 051228 17:13:35 [ERROR] Slave: Error 'Duplicate entry '9947776' for key 1' > on query. Default database: 'genteya'. Query: 'INSERT INTO `comentarios` > (id, idcom, nickcom, comentario, reply, ip, fecha) VALUES ('84600', > '264452', 'cipr22valencia', 'graias por los puntitos cielo pero si hay algo > que me gustaria mas que salir en primera paguina es conocerte mas jijiji > aver si te veo por mi *** o me das el tuyo un kiss y toma+++ puntitos ', > 'S', '81.202.240.73', '1135811423')', Error_code: 1062 > 051228 17:13:35 [ERROR] Error running query, slave SQL thread aborted. Fix > the problem, and restart the slave SQL thread with "SLAVE START". We stopped > at log 'mysql-bin.000004' position 184226200 > > I don't know why, but primary keys are inserted in slave with different > (autoincrement) numbers than master, and replication shut down in slave. > > CREATE TABLE `comentarios` ( > `index` int(25) NOT NULL auto_increment, > `id` int(9) NOT NULL default '0', > `idcom` int(9) NOT NULL default '0', > `nickcom` varchar(15) NOT NULL default '', > `comentario` text NOT NULL, > `reply` char(1) NOT NULL default '', > `ip` varchar(15) NOT NULL default '', > `fecha` bigint(20) NOT NULL default '0', > PRIMARY KEY (`index`), > KEY `idcom` (`idcom`), > KEY `id` (`id`) > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 > > Any idea? > > Thanks. > > Ivan Lopez. > Logosur. > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]