Roland Seuhs Roland Seuhs - 1 year ago 122
MySQL Question

How to search in the mysql command history

The mysql command-line client supports a history (you can use the cursor-keys to access and navigate it), but is there a way to search for a string like you can do in (for example) bash?

In bash you can do:

history | grep "command"

Is there something similar in mysql?

Answer Source

Usually this lists up all MySQL commands that have been used:

less ~/.mysql_history
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download