我做mysql数据恢复时报错1293应该怎么解决

我做mysql数据恢复时报错1293应该怎么解决,第1张

本帖最后由 cenalulu 于 2013-07-18 13:03 编辑

各位兄台

我在使用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.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/8613456.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-18
下一篇 2023-04-18

发表评论

登录后才能评论

评论列表(0条)

保存