# mysqlbinlog --help
-?, --help Display this help and exit
-s, --short-form Just show the queries, no extra info
-o, --offset=N Skip the first N entries
-h, --host=server Get the binlog from server
-P, --port=port Use port to connect to the remove server
-u, --user=username Connect to the remove server as username
-p, --password=password Password to connect to remote server
-r, --result-file=file Direct output to a given file
-j, --position=N Start reading the binlog at position N
-t, --table=name Get raw table dump using COM_TABLE_DUMB
-V, --version Print version and exit.
-- SQL 파일로 변환
mysqlbinlog xxx-bin.000001 > aaa.sql
mysqlbinlog -d database_01 mysql-bin.00001 > restore_00001.sql
mysqlbinlog --start-datetime="2008-12-30 01:00:00" --stop-datetime='2009-01-10 01:00:00' /usr/local/mysql/var/localhost-bin.000001 > bakcup.sql
-- 필요한 부분만 가져옴..
grep "INSERT" aaa.sql > bbb.sql
-- data import
mysql -u 계정아이디 -p 디비명< bbb.sql