Hi.
On Fri, Sep 21, 2001 at 02:31:44PM -0700, [EMAIL PROTECTED] wrote:
> I'm having a difficult time synchronizing my Master and Slave Servers.
> I've been doing this using MySQL Binary Logs, where the Master rotates the
> logs at 1 hour times, and the slave downloads it and imports it.
>
> What happens why I try to pipe the binlog into mysql is that it reports and
> error that there is a duplicate entry. Basically what I want to do, is
> overwrite the duplicate with the data from the binlog, but I can't find a
> way? thoughts?
Are you sure that you are using the same base database? You shouldn't
get duplicate errors if you do. Except you got the same errors on the
server.
> MySQL Slave import command that I've been using and having fail
>
> for i in dbbin*; do /usr/local/bin/mysqlbinlog $i |
> /usr/local/bin/mysql -f -u root --password=l4ka5Tdj databasename; done
I hope that isn't you real passwort?!? If it is, you may consider
changing it now. ;-)
> I can see there is a -r function in mysqlimport, but of course the BinLogs
> are in SQL format and this will not work
>
> Any help would be GREATLY appreciated
>
> p.s. suggesting that I use mysql's built in replication is not help.
Okay, if that isn't the way to go, you could probably replace all
INSERT with REPLACE in the SQL output?! Like
mysqlbinlog file | sed 's/INSERT INTO/REPLACE INTO/gi' | mysql ...
Bye,
Benjamin.
--
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php