Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got tab completion working for tables and columns (--auto-rehash), is there any way to also have tab completion for SQL commands eg

SE (tab) --> SELECT
share|improve this question
stackoverflow question? – ricbax Oct 6 '10 at 2:52
I'm not sure what your interface is. Is this some kind of MySQL client software, or the command line perhaps? – NReilingh Oct 6 '10 at 3:20
Looks like the stock mysql client program to me. – Ignacio Vazquez-Abrams Oct 6 '10 at 4:11
up vote 1 down vote accepted

You're probably talking about mysql command-line client.

For a single session, you can enable tab completion with command line switch --auto-rehash .

To set this behavior default, check your mysql configuration file my.cnf, find [mysql] region, and replace line



share|improve this answer
ahh, SQL commands must be typed in caps for autocompletion to work – cerberos Nov 28 '12 at 11:59
Not working for me. Something to do with vi key binding? – Frozen Flame Aug 24 '15 at 7:58
@FrozenFlame: I found the solution to this problem (which was what I was looking for when I found this answer) on Stack Overflow… – adam_0 May 5 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.