Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Retrieve Mysql command history

I have a bad habit of making notes on notepad++ and not saving those notes, so any new command or old command that I modify goes there. I recently found myself in dire need of a couple of commands I had run on one of my servers to repeat them on another, the savior was the following command:

cat ~/.mysql_history

Issue the above and unless you used a different user, you should see all the commands that you have issued in Mysql.