The mysql>
command-line prompt is iconic, shown
in countless documentation pages, forum posts, tutorials and
manuals. It’s immediately identifiable – one look, and you
immediately know the context in which commands are being
executed. So it’s only with good reason that we would consider
changing the prompt value to something else, and Daniël van Eeden
provided a compelling suggestion to modify this to
provide user, host and database context. Because the mysql prompt
is user-configurable, this is easy to do dynamically:
mysql> prompt something> PROMPT set to 'something> ' something> select 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) something>
Using the special character …
[Read more]