Using traditional UNIX log locations

I would prefer that my db logs go in the same place as my system logs, i.e. /var/log/mysql/mariadb-error.log.

I see a note that says that this location is distro-dependent. I am using Ubuntu 14.04 LTS.

I tried setting this in ./configure options with

--with-log-err=/var/log/mysql/mariadb-err.log and --log=err=/var/log/mysql/mariadb-err.log

Neither seems to work. /var/log/mysql is owned by user mysql.

Answer Answered by Ian Gilfillan in this comment.

There is a typo in your example above, it should be --log-error=xxx, not --log=err=xxx, if that was what you entered, it wouldn't have worked.

Either way, in Ubuntu, the error log goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf

There should be a note about this in your my.cnf config file, and you can set it there log-error = xxx, and if needs be comment out the syslog setting.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.