2

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:

  1. I can not find those binary log files. So where are they located?
  2. 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...
  3. Is it possible to recover the data and schema through the /var/log/mysqld.log file
xiaohan2012
  • 9,870
  • 23
  • 67
  • 101
  • Have you tried looking for `~/.mysql_history`? It could help recover the operations done from just the command line. If you had done anything that could reveal the schema, it should be in there. – vpit3833 Jul 01 '11 at 04:04
  • Pity, I used phpmyadmin so those operations are not through commandline – xiaohan2012 Jul 01 '11 at 07:56

1 Answers1

1

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.

vpit3833
  • 7,817
  • 2
  • 25
  • 25