各位兄台
我在使用mysqlbinlog 想测试一下是否可以用binlog正常恢复数据时,遇到一个错误
命令:
mysqlbinlog --no-defaults --start-datetime="2013-07-17 10:30:00" /var/lib/mysql/mysql-bin.000112 |mysql -uroot -ppassword
错误:ERROR 1032 (HY000) at line 324: Can't find record in ‘tablename'
没办法,使用如下命令导出数据:
mysqlbinlog --no-defaults --start-datetime="2013-07-17 10:30:00" /var/lib/mysql/mysql-bin.000112 >recovery.sql
然后看more recovery.sql
在mysql5.5版本中只能一个带CURRENT_TIMESTAMP的timestamp列默认值存在,5.6版本以上就没问题了在MySQL 5.5文档有这么一段话:
One TIMESTAMP column in a table can have the current timestamp as the default value for initializing the column, as the auto-update value, or both. It is not possible to have the current timestamp be the default value for one column and the auto-update value for another column.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)