MySQL has a set of internal caches. These can be cleared using the FLUSH and RESET commands. For example, if we have updated user privileges by manually altering the grant tables, we can make sure that these changes roll through the system by executing a
flush privileges;statement. Another common use of FLUSH is to clear the query cache:
flush query cache;This will defragment the query cache, improving performance. The RESET statement is used in a similar way to FLUSH. For example, we can use
reset query cache;Rather than defragmenting the query cache, this will actually clear it altogether. A complete list of flushable and resettable variables can be found in the MySQL manual.