Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to use Binary Log file for Auditing in MySQL? I want to track the change in a DB using Binary Log so that I can replicate these changes to other DB please do not give me hyperlinks for MySQL website. please direct me to find the solution


I have looked for auditing options and created a script using Triggers for that, but due toi the Joomla DB structure it did'nt worked for me, hence I have to move on to Binary Log file concept now i am stucked in initiating the concept as I am not getting the concept of making the server master/slave, so can any body guide me how to actually initiate it via PHP?

share|improve this question

migrated from Apr 8 '10 at 16:15

This question came from our site for professional and enthusiast programmers.

The first step would probably involve making a shorter title.... – Tyler Carter Apr 7 '10 at 5:54
This is a poor question. Can you tell us what you've tried so far? – ChaosPandion Apr 7 '10 at 5:55
Also, I wouldn't generally down vote just because of a long title, but you've been around here a little while... – Tyler Carter Apr 7 '10 at 5:55
Chacha G will it do now? – OM The Eternity Apr 7 '10 at 5:58
@Parth That's better. You probably still want to try to get it to a single line. How to use Binary Log file for Auditing and Replicating in MySQL? would be a good one. – Tyler Carter Apr 7 '10 at 6:01

Looks like you do not want to audit, but to replicate. MySQL's replication mechanism involves the use of the binary logs, but you do not need to deal with them directly (at least as long as everything is running smoothly). Replication is nothing you do from php, it is a matter of server configuration. Theoretically, you could build a script mimicing the replication mechanism, but I do not see any good reason to do so and it is probably more painful than using the existing replication mechanism. I'm afraid you have to familiarize yourself with the concept of master/slave. Besides reading the MySQL documentation, you can study the example configuration files that ship with mysql, some of them include the configuration needed for replication.

share|improve this answer
Thanks for the Suggestion.... – OM The Eternity Apr 7 '10 at 9:17
@titan can u suggest me how to initiate with this? – OM The Eternity Apr 7 '10 at 9:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.