i use mysql on ubuntu.i find all last commands history on terminal by history command but it exclude mysql query or commands.is there any method or command like history to find last mysql queries history on ubuntu
2 Answers
Those commands go into ~/.mysql_history
.
-
If you consider my answer acceptable, please click the tick mark next to the question to mark it as "answered".– JosJul 21, 2016 at 14:40
If you logged into mysql CLI with sudo
, it might actually be at the following location:
/root/.mysql_history
In any case, the following find
command can help you:
sudo find / -name .mysql_history