I tried this at root prompt but didnt help.
mysql> RESET QUERY CACHE;
IT showed
Query OK, 0 rows affected (0.00 sec)
Query cache and query history are different things.
MySql stores executed queries with their results in a query cache, so it can quickly respond when the same query requested (cache hit). Run RESET QUERY CACHE or FLUSH TABLES to clear query cache.
MySql stores commands executed from its own shell in a history file. It is located under your home directory (Unix): ~/.mysql_history
. Remove this file to clear history up to now (from shell):
rm -rf ~/.mysql_history
If you want to disable history completely, create the history file as a symlink to /dev/null
(from shell):
ln -s /dev/null $HOME/.mysql_history