Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to run some load tests on my MySQL server and check a bunch of relevant GLOBAL STATUS variables after each run. Is there an easy way to flush GLOBAL STATUS variables like the regular FLUSH STATUS command?

Restarting the server seems to be one way of accomplishing the same thing but I'd prefer something faster.

share|improve this question

migrated from serverfault.com Sep 1 '11 at 18:19

This question came from our site for professional system and network administrators.

    
There doesn't currently seem to be a way to flush ALL global status variables without a restart. Which ones are you specifically interested in? –  Derek Downey Sep 1 '11 at 19:58
    
currently would like to log variables like QCACHE, QUERIES, THREADS, ABORTED, READS along with COM_DELETE, COM_INSERT, COM_SELECT, COM_UPDATE, MAX_USED_CONNECTIONS, etc... –  Dan S Sep 1 '11 at 21:12
add comment

1 Answer 1

Try from command-line (not mysql prompt):

$ mysqladmin flush-status
share|improve this answer
    
looks like mysqladmin flush-status does not do what I expected it to. Back with more, but there was a very old feature request for this: bugs.mysql.com/bug.php?id=22875 –  Derek Downey Sep 1 '11 at 18:29
    
thanks for trying --- yeah saw that when googling around but figured it was either enabled by now or there were better ways of doing the same thing –  Dan S Sep 1 '11 at 19:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.