Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Subject: Re: Detecting new records

Subject: Re: Detecting new records

2007-11-01       - By Baron Schwartz

 Back
Hi Naufal,

Naufal Sheikh wrote:
> Hello list.
>
>
> Inorder to do some maintainance, I will be shutting down my production
> server running mysql4.1. I have already prepared a backup server which is
> running mysql4 and have imported the current database in it. Though one way
> of doing things can be to shut down the database on the production server
> and then take the dump and import it on the backup server and then after
> shifting has been done to retake the dump from backpserver and import it on
> the production system.
>
> My question is that is there any better way to do this. E.g. If there is a
> way to detect for new records anmd/or changes made to database, I can just
> take those changes and export them on the production system. Or can we
> compare the two databases on seperate servers and then sync them.
>
> If some one can please point me to the right direction or give me a pointer
> on what to look for?

You can enable binary logging, then replay the binary log events after
the switch.  The binary log records all changes to the data.  Read the
manual section about binary logging for the full details, but basically,
place this in the backup server's cnf file:

log-bin

Now begin using the backup server.  When you switch back, you can use
the mysqlbinlog tool to apply all the changes from the backup server's
binary log to the production server.

It sounds like you're not that experienced with MySQL, but if you're
familiar with replication, there are a lot of ways to make this easier.
 I'm recommending binary logging because it's the simplest method, even
if it's not the easiest.

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@(protected)