Mysql data recovery using mysqlbinlog
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
If you have the line log = /path/to/mysql.log
uncommented in my.cnf
, the queries will be in the mysql.log
. That is, answering the third question.
精彩评论