MariaDB Debugging

MariaDB is fork of MySQL which should be well known to most people

Turn on logging

In order to enable database logs we have to edit the following file:

sudo nano /etc/mysql/my.cnf

Inside this file we have to uncomment the lines below:

general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

After that restart the service:

sudo systemctl restart mysql

Now tail can be used to see the latest additions in log file:

sudo tail -f /var/log/mysql/mysql.log

Last updated