for mysql 5.6+, add to the mysql config file the next block of code [mysqld] general_log = on general_log_file=/usr/log/general.log for mariadb, add to the mariadb config file the next block [mariadb] general_log=1 log_output=FILE general_log_file=/queries.log