Can you change the thesql prompt

MySQL

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.

Best Answer

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>\_
Related Question