---
title: MySQL fields
description: MySQL-specific event fields. 
url: https://www.elastic.co/docs/reference/beats/packetbeat/exported-fields-mysql
products:
  - Beats
  - Packetbeat
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# MySQL fields
MySQL-specific event fields.
<definitions>
  <definition term="mysql.affected_rows">
    If the MySQL command is successful, this field contains the affected number of rows of the last statement.
    type: long
  </definition>
  <definition term="mysql.insert_id">
    If the INSERT query is successful, this field contains the id of the newly inserted row.
  </definition>
  <definition term="mysql.num_fields">
    If the SELECT query is successful, this field is set to the number of fields returned.
  </definition>
  <definition term="mysql.num_rows">
    If the SELECT query is successful, this field is set to the number of rows returned.
  </definition>
  <definition term="mysql.query">
    The row mysql query as read from the transaction's request.
  </definition>
  <definition term="mysql.error_code">
    The error code returned by MySQL.
    type: long
  </definition>
  <definition term="mysql.error_message">
    The error info message returned by MySQL.
  </definition>
</definitions>