0

i'am trying to switch /var/log/mysql/error.log into syslog in MySQL 8. Reason is compatibility with our monitoring for parse, maybe not that clean, but it does the job. I had no problem with this on mysql <=5.7

I followed man page https://dev.mysql.com/doc/refman/8.0/en/error-log-syslog.html and it start showing some start/stop messages, but still not quite I want to accomplished.

The log file /var/log/mysql/error.log is still the only log which show errors like these, which I would like to have in syslog:

2018-08-10T13:53:50.927165Z 1 [ERROR] [MY-012574] [InnoDB] InnoDB: Unable to lock ./ibdata1 error: 11 2018-08-10T13:54:06.285066Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release. 

I tried a lot of thing by now, even start mysqld_safe as root.

Please dont advise adding syslog under [mysqld], this setting is removed in 8.0.13 (next build)

In cnf I have only add /etc/mysql/mysql.conf.d/mysqld.cnf:

log_error_services = 'log_sink_syseventlog' 

Mysql version is mysql-community-server 8.0.12-1debian9

Any ideas?

1 Answer 1

0

If this is debian 9 its running systemd right? So the output would be going to the journal (The mysqld stderr will be going to the journal). Look at /proc/{mysqldpid}/fd and look where stdout/stderror go to. If so, journalctl should be able to access the mysql error log.

2
  • It is debian 9, but it does not run systemd. Commented Aug 21, 2018 at 8:59
  • /proc/{mysqldpid}/fd and looking at the 1 and 2 symlinks is where your error log is. Commented Aug 21, 2018 at 9:40

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.