I'm new to MySQL load balancing, I want to try the master-slave concept.
Whenever I setup master-slave for the first time, and both have up-to-date fresh data, that works perfectly fine. However, whenever the master goes down, or I stop and then restart it, the slave starts generating errors because of duplicate keys.
Why would this be happening and how can I prevent this?
My application has a lot of update queries something like 5 SELECTs then 3 UPDATEs or INSERTs
My data will grow with time and I'm expecting quite a high load in the future.
SHOW SLAVE STATUS\G. You cannot effectively troubleshoot something like this unless you start with theLast_errormessage. I say this because a duplicate key error would produceLast_errno : 1062in theSHOW SLAVE STATUS\Gbut I would need to seeLast_error. – RolandoMySQLDBA Aug 12 '12 at 23:04