Solved

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

Posted on 2008-06-18
3
900 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 78

Accepted Solution

by:
arnold earned 500 total points
ID: 21815564
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 103
mysql query for sum() 3 46
Import MySQL data into MS Access using VB.Net interface 5 47
Formating field in mysql Advance formatting 1 38
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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