Dancrumb
Dancrumb

Reputation: 27529

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 just 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?

Upvotes: 0

Views: 646

Answers (1)

eykanal
eykanal

Reputation: 27017

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!

Upvotes: 1

Related Questions