-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?

2
  • Is the mariadb service running right now? Has it ever been running? Have you checked the log files specified in /etc/my.cnf? Mar 16, 2019 at 3:20
  • mariadb is running well.other log files are everything ok.
    – kittygirl
    Mar 16, 2019 at 11:35

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .