Tutorial by Examples

In the .bashrc or .bash_profile, adding: export MYSQL_PS1="\u@\h [\d]>" make the MySQL client PROMPT show current user@host [database].
In mysqld.cnf or equivalent: [mysql] prompt = '\u@\h [\d]> ' This achieves a similar effect, without having to deal with .bashrc's.

Page 1 of 1