[英]Binary Log MySQL
I have some binary log files from localhost but when i write 我有一些来自本地主机的二进制日志文件,但是当我写时
mysqlbinlog mysql-bin.000001 > statament.sql
or a text file it just returns gibberish ie 或文本文件,它只返回乱码,即
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#120919 11:08:54 server id 1 end_log_pos 106 Start: binlog v 4, server v 5.1.33- community-log created 120919 11:08:54 at startup
ROLLBACK/*!*/;
BINLOG '
potZUA8BAAAAZgAAAGoAAAAAAAQANS4xLjMzLWNvbW11bml0eS1sb2cAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACmi1lQEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
'/*!*/;
# at 106
#120919 11:26:07 server id 1 end_log_pos 125 Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
So that is mainly what is bothering... I have not slaves set up ... any idea what I'm doing wrong ? 所以这主要是令人烦恼的...我没有设置奴隶...知道我在做什么错吗?
Thanks ! 谢谢 !
MySQL binary log by definition is logging the data manipulations in binary form to save time and space for processing. 按照定义,MySQL二进制日志以二进制形式记录数据操作,以节省处理时间和空间。 So when you examine them, you should add
--base64-output=decode-rows
option to mysqlbinlog
client have the the output decoded. 因此,当您检查它们时,应在
mysqlbinlog
客户端上添加--base64-output=decode-rows
选项,以对输出进行解码。
you can use this : 您可以使用此:
mysqlbinlog --no-defaults --base64-output=decode-rows -v mysql-bin.000001 > statament.sql
Instead of --no-defaults --base64-output=decode-row -v
代替
--no-defaults --base64-output=decode-row -v
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.