# MySQL

### Supported Platforms

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Prerequisites

This source supports MySQL versions 5.7 and 8.0.

### Configuration Table

| Parameter               | Type                | Default                                                                                                                                              | Description                                                                       |
| ----------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| telemetry\_types        | `telemetrySelector` | `["Logs", "Metrics"]`                                                                                                                                | Choose Telemetry Type.                                                            |
| enable\_general\_log    | `bool`              | false                                                                                                                                                | Enable to read and parse the general log file.                                    |
| general\_log\_paths     | `strings`           | `- \"/var/log/mysql/general.log\"`                                                                                                                   | Path to the general log file(s).                                                  |
| enable\_slow\_log       | `bool`              | true                                                                                                                                                 | Enable to read and parse the slow query log.                                      |
| slow\_query\_log\_paths | `strings`           | `- \"/var/log/mysql/slow*.log\"`                                                                                                                     | Path to the slow query log file(s).                                               |
| enable\_error\_log      | `bool`              | true                                                                                                                                                 | Enable to read and parse the error log.                                           |
| error\_log\_paths       | `strings`           | For CentOS / RHEL: `- \"/var/log/mysqld.log\"` \nFor SLES: `- \"/var/log/mysql/mysqld.log\"` \nFor Debian / Ubuntu: `- \"/var/log/mysql/error.log\"` | Path to the error log file(s).                                                    |
| start\_at               | `enum`              | end                                                                                                                                                  | Start reading the file from the 'beginning' or 'end'.                             |
| username\*              | `string`            |                                                                                                                                                      | Username used to authenticate.                                                    |
| password\*              | `string`            |                                                                                                                                                      | Password used to authenticate.                                                    |
| endpoint                | `string`            | localhost:3306                                                                                                                                       | The endpoint of the MySQL server.                                                 |
| transport               | `enum`              | tcp                                                                                                                                                  | The transport protocol used to connect to MySQL.                                  |
| database                | `string`            |                                                                                                                                                      | The database name. If not specified, metrics will be collected for all databases. |
| collection\_interval    | `int`               | 60                                                                                                                                                   | Sets how often (seconds) to scrape for metrics.                                   |

<mark style="color:red;">\*</mark>*<mark style="color:red;">required field</mark>*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
