Customizing the MySQL Prompt

MySQL Prompt is default.


I like this customizing that is [user name]@[host][selected database name], as follows.


Change the mysql> prompt using my.cnf or configration file for shell.

for example .zshrc, as follows.

export MYSQL_PS1='\U[\d]> '

for example my.cnf, as follows.

prompt='\\U[\\d]> '

you can customize the MySQL Prompt if you want.