<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysqlbinlog-hexdump">
      </a>
      6.6.9.1 mysqlbinlog Hex Dump Format
     </h4>
    </div>
   </div>
  </div>
  <p>
   The
   <a class="link" href="mysqlbinlog.html#option_mysqlbinlog_hexdump">
    <code class="option">
     --hexdump
    </code>
   </a>
   option causes
   <a class="link" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
    <span class="command">
     <strong>
      mysqlbinlog
     </strong>
    </span>
   </a>
   to produce a hex dump of the
        binary log contents:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa17215586"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlbinlog <span class="token property">--hexdump</span> source-bin<span class="token punctuation">.</span>000001</code></pre>
  </div>
  <p>
   The hex output consists of comment lines beginning with
   <code class="literal">
    #
   </code>
   , so the output might look like this for the
        preceding command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa96387263"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*!40019 SET @@SESSION.max_insert_delayed_threads=0*/</span><span class="token punctuation">;</span>
<span class="token comment" spellcheck="true">/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/</span><span class="token punctuation">;</span>
<span class="token comment" spellcheck="true"># at 4</span>
<span class="token comment" spellcheck="true">#051024 17:24:13 server id 1  end_log_pos 98</span>
<span class="token comment" spellcheck="true"># Position  Timestamp   Type   Master ID        Size      Master Pos    Flags</span>
<span class="token comment" spellcheck="true"># 00000004 9d fc 5c 43   0f   01 00 00 00   5e 00 00 00   62 00 00 00   00 00</span>
<span class="token comment" spellcheck="true"># 00000017 04 00 35 2e 30 2e 31 35  2d 64 65 62 75 67 2d 6c |..5.0.15.debug.l|</span>
<span class="token comment" spellcheck="true"># 00000027 6f 67 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |og..............|</span>
<span class="token comment" spellcheck="true"># 00000037 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|</span>
<span class="token comment" spellcheck="true"># 00000047 00 00 00 00 9d fc 5c 43  13 38 0d 00 08 00 12 00 |.......C.8......|</span>
<span class="token comment" spellcheck="true"># 00000057 04 04 04 04 12 00 00 4b  00 04 1a                |.......K...|</span>
<span class="token comment" spellcheck="true">#       Start: binlog v 4, server v 5.0.15-debug-log created 051024 17:24:13</span>
<span class="token comment" spellcheck="true">#       at startup</span>
<span class="token keyword">ROLLBACK</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   Hex dump output currently contains the elements in the following
        list. This format is subject to change. For more information
        about binary log format, see
   <a class="ulink" href="/doc/internals/en/binary-log.html" target="_top">
    MySQL
        Internals: The Binary Log
   </a>
   .
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Position
      </code>
      : The byte position within the
            log file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Timestamp
      </code>
      : The event timestamp. In the
            example shown,
      <code class="literal">
       '9d fc 5c 43'
      </code>
      is the
            representation of
      <code class="literal">
       '051024 17:24:13'
      </code>
      in
            hexadecimal.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Type
      </code>
      : The event type code.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Master ID
      </code>
      : The server ID of the
            replication source server that created the event.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Size
      </code>
      : The size in bytes of the event.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Master Pos
      </code>
      : The position of the next
            event in the original source's binary log file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Flags
      </code>
      : Event flag values.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
