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 use the "mysql" command-line tool all the time, and frequently forget what database (schema) I'm on.

Is there a way to change the prompt? It'd be much more useful to see foo_bar_schema> than mysql> all the time.

share|improve this question
up vote 3 down vote accepted

Take a look at the documentation for mysql commands.

You can change the prompt to just the current database by typing using this command:

prompt \d>\_
share|improve this answer
That documentation link will also help you make the change permanent. – William Jackson Oct 15 '11 at 13:36

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.