Question: Is there any way to **clear** mysql **query cache** without restarting mySQL server?

Answer: 
In my system (Ubuntu 12.04) I found `RESET QUERY CACHE` and even restarting mysql server not enough. This was due to [memory disc caching](https://askubuntu.com/questions/155768/how-do-i-clean-or-disable-the-memory-cache).  

After each query, I clean the disc cache in the terminal: 

```
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches

```

and then reset the query cache in mysql client:

```
RESET QUERY CACHE;

```
For anyone else, like myself, looking for a way to clear the query cache and finds this question, the [query cache is deprecated](https://dev.mysql.com/doc/refman/5.7/en/flush.html#flush-query-cache).

> 
> The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.
> 
> 
> 

Therefore the commands `RESET QUERY CACHE` and `FLUSH QUERY CACHE` have been removed.

Have a look at the answers on Database Administrators for more information: [Why did MySQL remove the query cache feature after version 8.0?](https://dba.stackexchange.com/a/217578/1926)