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:
mysqld.cnf
[mysql] prompt = '\u@\h [\d]> '
This achieves a similar effect, without having to deal with .bashrc's.
.bashrc
Topic Id: 5795
Example Ids: 20414,24831
This site is not affiliated with any of the contributors.
Content on the page is taken from Stack Overflow Documentation
This site is NOT affiliated with Stack Overflow or any of the contributors. | Privacy Policy | Terms of Service