MySQL and Syslog
am 15.05.2010 11:18:30 von James Corteciano
--00504502ccb2a0ffde04869e7970
Content-Type: text/plain; charset=ISO-8859-1
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?
Cheers.
James
--00504502ccb2a0ffde04869e7970--
Re: MySQL and Syslog
am 16.05.2010 06:51:17 von Dan Nelson
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#opti on_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@allantgroup.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org