Solved

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

Posted on 2008-06-18
3
923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 79

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

635 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