Roland Seuhs Roland Seuhs - 6 months ago 53
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?


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

less ~/.mysql_history