Mysql console program prompt string settings

Source: Internet
Author: User
Mysql console program prompt string settings, learn mysql friends can refer.

Mysql console program prompt string settings, learn mysql friends can refer.

The prompt command reconfigures the default mysql> prompt. The string for defining the prompt can contain the following special sequences.

The default prompt for the mysql console program is "mysql>". The prompt can be modified as needed:

You can set these parameters as follows:

Set the shell environment variable: MYSQL_PS1

Shell> export MYSQL_PS1 = "(\ u @ \ h) [\ d]>"

Run the program startup Command Option: -- prompt

Shell> mysql -- prompt = "(\ u @ \ h) [\ d]>"
(User @ host) [database]>

Set the [mysql] section in the option file and add the prompt Option

[Mysql]
Prompt = (\ u @ \ h) [\ d]> \\_
Use the prompt (\ R) command in the mysql Program

Mysql> prompt (\ u @ \ h) [\ d]> \_
PROMPT set to '(\ u @ \ h) [\ d]> \_'
(User @ host) [database]>
(User @ host) [database]> prompt
Returning to default PROMPT of mysql>
Mysql>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.