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
Solved

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

Posted on 2008-06-18
3
897 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 77

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 59
Display images from mysql blob type (Not working) 9 41
Samba Question 11 75
linux - yum package installation issue 2 58
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…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

856 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