Comments on: How to know if a MySQL slave is identical to its master http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/ Stay curious! Fri, 10 May 2013 18:25:19 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: mandm http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/#comment-18520 mandm Tue, 27 Jul 2010 16:38:11 +0000 http://www.xaprb.com/blog/?p=329#comment-18520 Hi Xaprb,
I thought since you are the guru in this master-slave replication process i shall ask you all the details about the failure i am facing in this. i see a similar duplicate entry error as mentioned above? how do i go about resolving this error and is rebuilding the slave the only way out? where should i look for the errors?

please let me know if you need more details from me? thanks in advance

]]>
By: Xaprb http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/#comment-13594 Xaprb Wed, 31 Oct 2007 13:06:40 +0000 http://www.xaprb.com/blog/?p=329#comment-13594 Whoops — I should give more info. You can use CHECK TABLE and/or REPAIR TABLE and related commands. Check the relevant section of the manual; it has a lot of info about table corruption and how to fix it.

]]>
By: Xaprb http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/#comment-13593 Xaprb Wed, 31 Oct 2007 13:05:15 +0000 http://www.xaprb.com/blog/?p=329#comment-13593 Sounds like table or index corruption on the slave.

]]>
By: Tim H http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/#comment-13592 Tim H Wed, 31 Oct 2007 12:59:08 +0000 http://www.xaprb.com/blog/?p=329#comment-13592 thanks! great info.
I need to implement this system. In the meantime, i had a replication error i cant figure out. Its the “duplicate entry” error, but when i checked the tables, I didnt see a duplicate!

Heres the error on the SLAVE:
Last_Error: Error ‘Duplicate entry ’555895_17327′ for key 3′ on query. Query: ‘INSERT INTO meeting_sessions (userID, meeting_id, meetingSessionID, sessionID, tstamp, action, userPosition, conport, conhost, clientID, clientVersion) VALUES (@’0′, @’1′, @’2′, @’3′, @’4′, @’5′, @’6′, @’7′, @’8′, @’9′, @’10′)’

————————–
When I looked at the last slave record in that table, it matches the master at the same position in the table! Is there anyway to fix this without re-snapshotting the whole db?

]]>
By: timor http://www.xaprb.com/blog/2007/04/07/how-to-know-if-a-mysql-slave-is-identical-to-its-master/#comment-13517 timor Thu, 11 Oct 2007 11:35:39 +0000 http://www.xaprb.com/blog/?p=329#comment-13517 Here id another way of checking in runtime if slave is in sync with master:

function slaveUpdated(){
[ed: snipped mangled code that checks SHOW SLAVE STATUS]

]]>