3

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 2

7

Those commands go into ~/.mysql_history.

1
  • If you consider my answer acceptable, please click the tick mark next to the question to mark it as "answered".
    – Jos
    Jul 21, 2016 at 14:40
1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .