HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is it safe to "FLUSH STATUS" in mysql?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
statusmysqlsafeflush

Problem

We have deployed REDIS to hold some frequent query result to reduce number of connections made on Database server. We need to find out Max_used_connection after deploying REDIS. So we plan to reset mysql status variable Max_used_connection.

While googling i found to reset Max_used_connections we need to use FLUSH STATUS.

Is it safe to execute Flush status in production ?
MySQL docs says:

FLUSH STATUS - resets the counters for key caches (default and named) to zero and sets Max_used_connections to the current number of open connections.

I don't know impact of resetting counters for key caches.

Is it possible to reset Max_used_connections alone ?

Thanks in Advance.

Solution

Is it safe to execute Flush status in production ?

  • Well it should not affect anything as such but resets the status counters and you should be "Safe".




Is it possible to reset Max_used_connections alone ?

  • No




but "We need to find out Max_used_connection after deploying ...."

  • How about introducing graphs into monitoring? Say Cacti / Grafana will give you good glances over what's-going-on-inside-your-mysql!

Context

StackExchange Database Administrators Q#129992, answer score: 5

Revisions (0)

No revisions yet.