Re: Mysqld logs

From: Brett Neumeier <random_at_freesa.org>
Date: Sat, 7 Dec 2024 09:19:08 -0600

On Sat, 7 Dec 2024 15:40:30 +0100
Paul Sopka <psopka_at_sopka.ch> wrote:

> Hey everybody
>
> From what I could find, mysqld, a server deamon for mysql,
> seems to only be able to output logs to files.
> Is it a bad idea to run it in the following way?
>
>     mysqld --log_error=/dev/stdout
>
> e.g. in that there any Unix you know about that does not support
> /dev/stdout?

I don't know of any. If you're concerned, though, you can always
create a FIFO and write log output to it, and then read from that
FIFO in your logging service. That's my common practice when a
program prefers to write log messages to a file. (Or when I set up
a program to write to several different logs, like nginx.)

One thing, though -- MariaDB is the fork of MySQL that I use, and
it has a `--console` option that causes those messages to be written
to stdout already. Perhaps MySQL has that option as well?
That would be even simpler.

Cheers,

Brett

-- 
Brett Neumeier <random_at_freesa.org>
Received on Sat Dec 07 2024 - 16:19:08 CET

This archive was generated by hypermail 2.4.0 : Sat Dec 07 2024 - 16:19:45 CET