Solved

use mysqlbinlog to read from remote server binlog files -- what is wrong?

Posted on 2008-06-18
3
880 Views
Last Modified: 2013-12-16
Hi anyone _EVER_ able to get mysqlbinlog to remotely read a server's binlog?
I have read http://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html
and the command I use is:
=====================
mysqlbinlog --read-from-remote-server  --database=mydbname --start-datetime="2008-06-11 00:00:00" --stop-datetime="2008-06-16 23:59:59" -hremotehost -umyusername -pmypassword -rmyresult.txt
====================
remote host running default 3306.
and if I ssh to the server then I can read it successfully for that time period, by specifying the path & name of input binlogs.
however it did not give me result, but poping me the manpage of mysqlbinlog.
It looks like the format I am using is wrong womewhere.
Do I need to specify binlog path when reading remotely? --I don't think it makes sense in this way.
so where is wrong?
0
Comment
Question by:loadover
3 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
You are not listing the log_filenames where it should look.
Presumably when you are on the local machine you are in the directory where the log files are when you run the command.

Try this where /var/mysql/log is the location for the binlog files.
mysqlbinlog --read-from-remote-server  --database=mydbname --start-datetime="2008-06-11 00:00:00" --stop-datetime="2008-06-16 23:59:59" -hremotehost -umyusername -pmypassword -rmyresult.txt /var/mysql/log/*

Open in new window

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now