Get the App
SLTechnology News&Howtos  ›  Database  › 

Prompt prompt

Shulou Source: shulou.com Published: 2022-06-01 11:42:49 10月06日 Update

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

Tags: Prompt prompt parameter method configuration original host content variable name command character string common data database file date standard environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Information NVidia Linux Apple