How to enable the MySQL/MariaDB general query logs Enter to MySQL/MariaDB server command-line tool (change root with your username and password): mysql -u root -proot Set the general log file path: SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';