HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=18)
-   -   Error after database sync (http://www.howtoforge.com/forums/showthread.php?t=56135)

deeaspark 11th February 2012 10:34

Error after database sync
 
it's a master - master replication ....

My question: when i run a "create table" statement on one of the databases, is that table also created on the other table ?
or just the table content (the inserted rows) are in sync ?
and here is the error on one of the masters :

120209 22:50:20 [ERROR] Slave SQL: Error 'Duplicate entry '174' for key 'PRIMARY'' on query. Default database: 'rent'. Query: 'INSERT INTO jobs(title, job_type_id, buyer_id, service_provider_id, price_low, price_high, status_id,
created)
VALUES("Test Polo Shirt 2", 2, 65, 64,
"15.00", "50.00", '1208', now())', Error_code: 1062
120209 22:50:20 [Warning] Slave: Field 'modified' doesn't have a default value Error_code: 1364
120209 22:50:20 [Warning] Slave: Duplicate entry '174' for key 'PRIMARY' Error_code: 1062
120209 22:50:20 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysqld-bin.000001' position 6096

falko 12th February 2012 13:00

Quote:

Originally Posted by deeaspark (Post 273358)
My question: when i run a "create table" statement on one of the databases, is that table also created on the other table ?

Yes, the database is alsos created in the other database.

Quote:

Originally Posted by deeaspark (Post 273358)
120209 22:50:20 [ERROR] Slave SQL: Error 'Duplicate entry '174' for key 'PRIMARY'' on query. Default database: 'rent'. Query: 'INSERT INTO jobs(title, job_type_id, buyer_id, service_provider_id, price_low, price_high, status_id,
created)
VALUES("Test Polo Shirt 2", 2, 65, 64,
"15.00", "50.00", '1208', now())', Error_code: 1062
120209 22:50:20 [Warning] Slave: Field 'modified' doesn't have a default value Error_code: 1364
120209 22:50:20 [Warning] Slave: Duplicate entry '174' for key 'PRIMARY' Error_code: 1062
120209 22:50:20 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysqld-bin.000001' position 6096

You have a duplicate entry somewhere. Please check your database.


All times are GMT +2. The time now is 13:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.