Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read innodb log file?

I would like to see "general query log" from innodb log file, so is there anybody know how to see / read those query logs?

I tried MySQL admin utility, it shows only error log and query log is disabled.

like image 354
John Cure Avatar asked Apr 16 '11 17:04

John Cure


1 Answers

The answer is that you can not.

The ib_logfile* files do not contain queries, but rather 512-byte aligned instructions on how to re-apply changes made by queries. For example:

[Space-id] [Page-id] [Where-in-the-page-to-modify] [Payload]

  • Space-id is the file number (e.g. ibdata1 = file number zero).
  • Page-id is which page within that file. All pages are 16K.
like image 82
Morgan Tocker Avatar answered Oct 05 '22 00:10

Morgan Tocker