On 20.07.2008 23:49 CE(S)T, Rob Wultsch wrote:
On Sun, Jul 20, 2008 at 1:33 PM, Yves Goergen
<[EMAIL PROTECTED]> wrote:
Hello,

I've installed MySQL server 5.0 and have written a small statistics script
that regularly checks the number of connections and queries to the server,
which I can then view in a diagram. But sometimes it just says that at a
time, unusually many connections or queries have been made to the server. I
cannot see what causes them. Neither the user nor the actual queries.

At work I got in touch with the Oracle Enterprise Manager recently. I
haven't looked at it too closely yet, but I think it could give useful
information about each session, what it does and more importantly what it
did.

I have no idea what to search for to get this information from the MySQL
server. So I had to ask here first. Is there any method to get those
statistics? I don't mean the SHOW PROCESSES list, it only contains a
snapshot of the very moment when MySQL got to execute my command. I mean
information about recent activity, like 15 minutes, 2 hours or so.

Check out the general query log:
http://dev.mysql.com/doc/refman/5.0/en/query-log.html

As far as I have understood that, there is only one log that can be turned on or off. When turned on, it logs every single query sent to the server. I hope it also logs some other data, like the username and maybe the client address (local/remote). But this has one major drawback: To enable or disable the log (which, I can imagine, takes quite a bit performance) the whole server must be stopped and restarted. This isn't really an option for a production database server, just to know what's going on from time to time.

--
Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]>
Visit my web laboratory at http://beta.unclassified.de

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to