How to read innodb log file?

16,145

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.
Share:
16,145
John Cure
Author by

John Cure

Updated on June 12, 2022

Comments

  • John Cure
    John Cure almost 2 years

    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.

  • John Cure
    John Cure about 13 years
    I actually have log files, ib_logfile0, but i need to see the last, say, 4 days queries. So my question is how to see them
  • Leonardo
    Leonardo about 8 years
    Morgan, do you have the source of this information?
  • kanchan
    kanchan over 6 years
    i want to see the queries run / set of instructions sent to mysql using ib_logfiles and ibdata1. how is that possible? any parser or extraction tool?