Would you like to learn how to enable the MySQL query log? In this tutorial, we are going to show you how to enable the MySQL query log on a computer running Ubuntu Linux.
• Ubuntu 18.04
• Ubuntu 19.04
• MySQL 5.7
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Related tutorial – MySQL
On this page, we offer quick access to a list of tutorials related to MySQL.
Tutorial MySQL – Enabling the query log
Locate the configuration file of MySQL.
Copy to Clipboard
Edit the configuration file.
Copy to Clipboard
In the MYSQLD area, add the following lines.
Copy to Clipboard
As an example, here is our configuration file.
Copy to Clipboard
Restart the Mysql service.
Copy to Clipboard
Check the Mysql queries log.
Copy to Clipboard
In our example, we enabled the MySQL query log.