开发者

How do I log queries for just one database?

I have a number of databases running on a server.

I'd like to log queries going to j开发者_运维知识库ust one database (I have a wiki on the same box and I don't care about wiki queries).

I've done some googling, but can't find the answer I'm looking for.

Are there any settings I can use to limit the entries in my MySQL log, so that only queries to a single database are logged?


The short answer is no.

The longer answer is that with a bunch of work, you can monitor the log for new input, drop stuff you don't want, keep what you do, and regularly recycle the log. It seems based on this discussion (towards the end, post entitled "...Have you tried the normal usage of a named pipe?") that simply trying to specify a named pipe as the logfile doesn't work. They don't specify why, though, so you can try it and see for yourself. Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜