MySQL
Configure MySQL Log Source with BindPlane
Supported Versions
MySQL versions
- 9.0
- 8.0
- 5.7
MariaDB versions
- 10.6
- 10.5
- 10.4
- 10.3
- 10.2
Prerequisites
To enable certain log files, it may be necessary to edit the MySQL configuration file: mysqld.cnf.
Error Log
This is generally enabled by default. To change the file path, you can set or update "log_error" within mysqld.cnf.
For more details, see the error log documentation here.
Query Log
Query Log
Note that by enabling the query log, all queries will be logged. This can consume significant disk space.
To enable the query log, set general_log_file to the desired log path and set general_log = 1.
For more details, see the query log documentation here.
Slow Query Log
To enable the slow query log, set slow_query_log_file to the desired log path. Set slow_query_log = 1 and optionally, configure long_query_time.
For more details, see the slow query log documentation here.
Configuration
Option | Description |
---|---|
General Logs | Use this field to verify the path to the General log file and adjust default as needed (/var/log/mysql/general.log). |
Slow Query Logs | Use this field to verify the path to the Slow Query log file and adjust default as needed (/var/log/mysql/slow.log). |
Error Logs | Use this field to verify the path to the Error log file and adjust default as needed (/var/log/mysql/mysqld.log). |
Start At | Choose whether to start reading from the beginning or end of a file with "end" being the default. |
Log Types
Types |
---|
mysql.slow_query |
mysql.server-start |
mysql.error |
mysql.audit |
mysql.general |
Advanced
For more information on the advanced configuration capabilities, see our detailed plugin guide here.
Updated over 3 years ago