In the last episode (May 15), James Corteciano said:
> Hi All,
>
> Anyone had tried to push all MySQL logs to the centralized syslog server?
> Can you share with me how did you do it?
>
> I have centralized syslog (rsyslog-3.22.1-3.el5) server who resides
> separately and a remote MySQL server (mysql-server-5.0.77-4.el5_4.2) on
> other node. How to accomplish this to work smoothly that all logs of MySQL
> will be forwarded to the syslog?
Best solution is to upgrade to mysql 5.1 and pass --syslog to mysqld_safe when
starting mysql:
http://dev.mysql.com/doc/refman/5.1/en/mysqld-safe.html#option_mysqld_safe_syslog
Next best solution:
tail -F -n 0 /path/to/mysql.err | logger -p daemon.notice -t mysql
Run that before starting mysql, and any lines written to the log file will
get redirected to syslog.
--
Dan Nelson
dnelson@stripped
| Thread |
|---|
| • MySQL and Syslog | James Corteciano | 15 May |
| • Re: MySQL and Syslog | Dan Nelson | 16 May |