views:

216

answers:

1

Hi guys,

What would be the best ways to monitor mysql performance and load, queries per second, total queries over a hour etc?

Thanks!

+2  A: 

Firstly, be sure to watch for slow queries: http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

mysqladmin extended is very useful. See http://www.mysql.com/news-and-events/newsletter/2004-01/a0000000301.html for some tips.

Eli
Hi eli, thanks. Cannot get access to the slow queries log ftm, but I will look into it. Can't however see how I output the mysqladmin extended. Can i do it with a normal PHP query?
Industrial
`mysqladmin` is an application on your server. You could do it with a normal query, probably, but I don't know enough about it. In PHP, you could run `exec('mysqladmin extended')` to have your system execute it as a shell command.
Eli