Prompt prompt
Welcome to the MySQL 8.0 must-know course series.
MySQL8.0 must know-automatic deployment of https://edu.51cto.com/course/16368.html MySQL8.0 must know parameters standardized configuration https://edu.51cto.com/course/16358.html
Reconfigure the prompt for the default mysql >
Common option
User (\ u)
Host (\ h)
Database (\ d)
Counter (\ c)
Session ID (\ C)
Full account name user_name@host_name (\ U)
Complete current date (\ D)
Setting method:
1. Environment variable
Export MYSQL_PS1= "(\ u@\ h) [\ d] >"
two。 Command line options
Mysql-- prompt= "(\ u@\ h) [\ d] >"
3. Parameter file
[mysql]
Prompt= (\\ u@\\ h) [\\ d] >\ _
4. Interactive mode setting
Everything after the first space after PROMPT will be part of the prompt string
Mysql > prompt (\ u @\ h) [\ d] >\ _
Restore the original prompt
(root@localhost) [(none)] > prompt