mysql client shortcuts
I hate it when I start typing a long query in the mysql client (mysql command-line interface) and then I realize that I'm not ready to run it yet or that I need to run a different query first. I either have to hit backspace 137 times, or I sometimes hit ctrl-c thinking I am using a bash shell; which of course kills mysqlclient, requiring me to reconnect.
Fortunately, I've finally found some shortcut key sequences to solve this problem, as well as some other useful tips. (these shortcuts also work in bash)
ctrl-w - 'cut' the word before cursor
ctrl-u 'cut' all input before cursor
ctrl-y 'paste' cut text
alt-f - move forward one word
alt-b - move backwards one word
ctrl-a - move cursor to the begining of the line
ctrl-b - move backwards one character
ctrl-e - move cursor to the end of the line
ctrl-f - move forward one character
ctrl-h - deletes one letter at a time (backspace)
ctrl-l - clear screen
ctrl-r - search previous queries

