I am using mariadb and I to investigate some issue I wanted to check the logs. To my surprise, log file is not generated for mariadb.
I suspect this cannot be the case so I am doubting my search skills.
MariaDB [(none)]> show variables like 'log_error' -> ; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | log_error | | +---------------+-------+ 1 row in set (0.00 sec)
I have added the entry in my.cnf still above field is coming to be empty.
[root@cslcodev11-oem ~]# cat /etc/my.cnf [mysqld] !includedir /etc/mysqld/conf.d datadir=/mnt/mgmt/var/lib/mysql socket=/var/lib/mysql/mysql.sock tmpdir=/mnt/mgmt/var/lib/mysql_tmp user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 ### TRT-3229 ##### sync_binlog=1 innodb_flush_method=O_DIRECT innodb_support_xa = 1 myisam_repair_threads = 2 myisam_recover_options = FORCE ################### innodb_file_per_table=1 innodb_log_buffer_size = 8M table_open_cache=256 max_heap_table_size=256M ### TRT-4685 ### max_connections=500 ################ innodb_log_file_size = 512M [mysqld_safe] log-error=/var/log/mariadb/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [root@cslcodev11-oem ~]#
So, I want to know do we have any default location where these logs are getting generated, if the path cannot be read from config files.
INFO: Reference: https://mariadb.com/kb/en/mariadb/error-log/
On the MariaDB Knowledge base page for the error-log there is a paragraph that states.
systemd has its own logging system, and Linux distributions running systemd may log errors there instead. To view the systemd logs, use:
# journalctl -u mariadb.
This answers the question because –log-error would be an option that could be added to MY_SPECIAL.conf file and journalctl is where mariadb logs errors by default on a systemd system.