Basic mysql Command-line Client Navigation

On Unix-like operating systems, such as Linux and Mac OS X, mysql includes the GNU Readline librarya powerful tool that allows you to quickly navigate around the command line. Readline includes more than 100 commands, but only the dozen or so most useful commands are covered here. If you want to learn more about Readline, run man readline from your shell.

Some of the most useful key bindings (along with handy mnemonics to help you remember them) are

  • Go to line start CTRL+a. Remember that a is the first letter of the alphabet.

  • Go to line end CTRL+e. Remember that e stands for end.

  • Move one word backward ALT+b. Remember that b stands for backward.

  • Move one word forward ALT+f. Remember that f stands for forward.

  • Delete previous word CTRL+w. Remember that w stands for word.

  • Delete to start of line CTRL+u.

  • Clear screen CTRL+l (lowercase L).

  • Uppercase/lowercase previous word ALT+u or ALT+l (lowercase L). Remember ALTer to uppercase or lowercase.

  • Undo previous typing ALT+_.


Mac OS X users: You need to change the behavior of your option key in order to use the alt key bindings (such as ALT+f). Follow these steps:




Select the Terminal menu.


Select the Window Settings submenu.


A dialog window named Terminal Inspector opens.


Select the Keyboard option from the select list at the top of the Terminal Inspector dialog window.


Ensure that the Use Option Key as Meta Key check box is checked.

MySQL Phrasebook. Essential Code and Commands
MySQL Phrasebook
ISBN: 0672328399
EAN: 2147483647
Year: 2003
Pages: 130

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: