使用mysqlbinlog恢复Mysql数据
我不小心删除了一个架构而没有备份它。
现在我想使用 mysqlbinlog 实用程序来执行恢复。 (看来mysqlbinlog是个好工具)。它需要这些二进制日志文件来执行恢复。
现在我有以下困惑:
- 我无法找到那些二进制日志文件。那么它们位于哪里?
- 如果未记录操作或未启用二进制日志记录,如何启用它。 我已阅读 mysql 文档,它说它们默认启用。但我找不到这些文件...
- 是否可以通过 /var/log/mysqld.log 文件恢复数据和架构
I accidentally dropped a schema without backing it up.
And now I want to use mysqlbinlog utility to perform recovery. (It seems that mysqlbinlog is a good tool). And it needs those binary log files to perform recovery.
Now I have the following confusions:
- I can not find those binary log files. So where are they located?
- If the operations are not logged or binary logging is not enabled, how to enable it.
I have read the mysql documentation, it says they are enabled as default. But I cannot find those files,though... - Is it possible to recover the data and schema through the /var/log/mysqld.log file
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在
my.cnf
中取消注释了log = /path/to/mysql.log
行,则查询将位于mysql.log
中>。也就是回答第三个问题。If you have the line
log = /path/to/mysql.log
uncommented inmy.cnf
, the queries will be in themysql.log
. That is, answering the third question.