E
E
ewgenkmz2021-05-27 12:25:22
MySQL
ewgenkmz, 2021-05-27 12:25:22

The query "RESET QUERY CACHE;" does not work How to clear cache in MySQL 8?

mysql> RESET QUERY CACHE;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'QUERY CACHE' at line 1
mysql> flush query cache;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'query cache' at line 1


$ mysql --version
mysql  Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))


The Internet is also full of recommendations just how to clear the cache. For example, if you take the information here, everything is correct: www.mysql.ru/docs/man/RESET.html
According to the 8th version, there is already no such option: https://dev.mysql.com/doc/refman/8.0/en/ reset.html

How do I clear the cache in Mysql 8 then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-05-27
@Rsa97

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

https://dev.mysql.com/doc/refman/5.7/en/query-cach...
It's hard to clean up something that doesn't exist at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question