Skip to content

Turn On Mysql General Log

How to turn onthe Mysql General Log#

Add the log settings in /etc/mysql/my.cnf

[mysqld]
general_log_file = /var/log/mysql/mysql.log
general_log = 1

Or in Mysql cli (mysql -u <username> -p) run

> SET GLOBAL general_log=1;

Restart the service:

sudo systemctl restart mysql

Source#