Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.