How to view mariadb log?

One of the ways to find out your current log file path is using the following SQL query:

show global variables like 'log_error';

The output should look something like this:

+---------------+---------------------+
| Variable_name | Value               |
+---------------+---------------------+
| log_error     | /var/log/mysqld.log |
+---------------+---------------------+

I had the same issue on Debian 8.5, using MariaDB 10.1.16. I put the configuration as recommended but nothing, there was no way that the error.log file was written with the errors.

At the end, look in / var / log / syslog and there were the errors and warnings

tail -f /var/log/syslog | grep mysql