Description:
MySQL 5.7.10-log version, I using mysqlbinlog point-in-time recovery, but because of the reason of the DELIMITER is not normal to exit, lead to the failure recovery.
[root@localhost mysqldata-b2c]# mysqlbinlog mysqlbin.000004 --start-position=4 --stop-position=1238
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#151223 4:18:14 server id 13306 end_log_pos 123 CRC32 0x68c9fd13 Start: binlog v 4, server v 5.7.10-log created 151223 4:18:14
# Warning: this binlog is either in use or was not closed properly.
BINLOG '
BrB5Vg/6MwAAdwAAAHsAAAABAAQANS43LjEwLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXwAEGggAAAAICAgCAAAACgoKKioAEjQA
ARP9yWg=
'/*!*/;
# at 123
#151223 4:18:14 server id 13306 end_log_pos 154 CRC32 0x0bba278c Previous-GTIDs
# [empty]
# at 154
#151223 4:19:08 server id 13306 end_log_pos 219 CRC32 0x019ca969 Anonymous_GTID last_committed=0 sequence_number=1
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;
# at 219
#151223 4:19:08 server id 13306 end_log_pos 300 CRC32 0x38bcdc86 Query thread_id=6 exec_time=0 error_code=0
SET TIMESTAMP=1450815548/*!*/;
SET @@session.pseudo_thread_id=6/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1436549152/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=83,@@session.collation_connection=83,@@session.collation_server=83/*!*/;
SET @@session.time_zone='SYSTEM'/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 300
#151223 4:19:08 server id 13306 end_log_pos 349 CRC32 0xd4e883d6 Table_map: `kaina`.`t` mapped to number 108
# at 349
#151223 4:19:08 server id 13306 end_log_pos 394 CRC32 0x55cc7786 Write_rows: table id 108 flags: STMT_END_F
BINLOG '
PLB5VhP6MwAAMQAAAF0BAAAAAGwAAAAAAAEABWthaW5hAAF0AAMDDwoCPAAE1oPo1A==
PLB5Vh76MwAALQAAAIoBAAAAAGwAAAAAAAEAAgAD//gBAAAAAWGXvw+Gd8xV
'/*!*/;
# at 394
#151223 4:19:08 server id 13306 end_log_pos 425 CRC32 0xf4ee2da8 Xid = 13
COMMIT/*!*/;
WHEN Recovery it,Error:
[root@localhost mysqldata-b2c]# mysqlbinlog mysqlbin.000004 --start-position=4 --stop-position=1238 |mysql -uroot -predhat -S /tmp/mysql.sock3306
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 7: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'' at line 1
Then I have a test on other host,LIKE this:
mysql> DELIMITER /*!*/;
mysql> SELECT * FROM kaina.t /*!*/;
+----+------+------------+
| id | name | date |
+----+------+------------+
| 1 | a | 2015-12-23 |
| 2 | b | 2015-12-23 |
| 3 | c | 2015-12-23 |
| 4 | d | 2015-12-23 |
+----+------+------------+
4 rows in set (0.00 sec)
->
->
Becase This reason,I can't recovery mysqlbinlog OK.
How Can I do?
How to repeat:
My Email ; 437088610@qq.com