-1

My system is centos 7 with mariadb 5.5.60.

####LOG####
log_warnings=1
log-error=/var/log/mariadb-err.log
####slow log####
slow-query-log=1
long_query_time=5
slow-query-log-file=/var/log/mariadb-slow.log

That 's all about log in my /etc/my.cnf.

I found /var/log/mariadb/mariadb.log in my server, but it's a empty file.
What's /var/log/mariadb/mariadb.log?

kittygirl
  • 945
  • 5
  • 13
  • 33

1 Answers1

1

The log files are specified in the /etc/my.cnf file in your question. Upon a fresh installation, the error log is set as /var/log/mariadb/mariadb.log and created at that location and is an empty file.

In yours, it is /var/log/mariadb-err.log. Either you or someone else changed that line in /etc/my.cnf before starting the service which is why the logs specified in /etc/my.cnf have data in them whereas /var/log/mariadb/mariadb.log is empty. If you want logging to go to that file instead then all you need to do is change it in /etc/my.cnf and restart the service.

Nasir Riley
  • 2,137
  • 9
  • 10