各位兄弟姐妹:
  出于工作需要,小弟最近一段时间都在研究MYSQL。已经快被二进制日志恢复搞得有点头大了!所在在此贴
乞求哪位好心人能够拉小弟一把。
   备份分为二个部分
   1)完全备份是每一天一次,每次备份三个库。备份第一个数据库时会flush-log。
  eg: mysqldump --single-transcation -opt db1  --flush-log >11.sql
      mysqldump --single-transcation -opt db2  --flush-log >12.sql
      mysqldump --single-transcation -opt db3 --flush-log >13.sql
 然后把最晚的一个bin.日志压缩。
    2) 备份完成后,会每一个小时会FLUSH-LOG一次。以记录数据库在该小时内发生的变化。恢复
1)我使用MYSQL常用的还原数据库方法,很轻易能还原了完整备份。在但出还原二进制日志时出现了问题。
我尝试二种方法去导入数据
  1.mysqlbinlog mysql-bin.000033 |mysql -u root -p
结果报:
C:\>mysqlbinlog -d maypan_char11 --start-datetime "2008-12-30 00:30:00" --stop-
atetime "2008-12-30 00:32:00"  f:\2008-12-30\mysql-bin.000076 |mysql -u root -p
23
ERROR 1064 (42000) at line 342: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to us
 near '' at line 1
mysqlbinlog: Error writing file 'UNOPENED' (Errcode: 0)
mysqlbinlog: Error writing file 'UNOPENED' (Errcode: 22)2.将binLOG中的日志导入脚本后,mysql -u root -p -e "source e:\mysql.sql" 

 You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to us
 near '' at line 1
进行MYSQL客户端
执行source e:\mysql.sql
发现会执行脚本,但时常会报:You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to us
 near '' at line 1
同时,一直无法运行完毕。(200M 日志 执行1:30小时仍没有停止)以上情况,就是小弟目前遇到情况,还请各位高手多多帮忙。