国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

mysql 控制臺程序的提示符 prompt 字符串設置

2024-07-24 13:02:52
字體:
來源:轉載
供稿:網友
The prompt command reconfigures the default mysql> prompt. The string for defining the prompt can contain the following special sequences.

mysql 控制臺程序的默認提示符為 "mysql>". 該提示符可用根據需要進行修改設置:

有以下幾種設置方式:

設置shell 的環境變量 : MYSQL_PS1

shell> export MYSQL_PS1="(/u@/h) [/d]> "

使用程序啟動命令選項 : --prompt

shell> mysql --prompt="(/u@/h) [/d]> "
(user@host) [database]>

設置選項文件中的 [mysql] 節,添加 prompt 選項

[mysql]
prompt=(//u@//h) [//d]>//_
在 mysql 程序中使用 prompt (/R) 命令

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>

prompt 中一些特殊的轉義字符串

OptionDescription

/cA counter that increments for each statement you issue

/DThe full current date

/dThe default database

/hThe server host

/lThe current delimiter (new in 5.1.12)

/mMinutes of the current time

/nA newline character

/OThe current month in three-letter format (Jan, Feb, …)

/oThe current month in numeric format

/Pam/pm

/pThe current TCP/IP port or socket file

/RThe current time, in 24-hour military time (0–23)

/rThe current time, standard 12-hour time (1–12)

/SSemicolon

/sSeconds of the current time

/tA tab character

/U

Your full user_name@host_name account name

/uYour user name

/vThe server version

/wThe current day of the week in three-letter format (Mon, Tue, …)

/YThe current year, four digits

/yThe current year, two digits

/_A space

/ A space (a space follows the backslash)

/'Single quote

/"Double quote

//A literal “/” backslash character

/x

x, for any “x” not listed above

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 扬中市| 嘉义市| 吉木乃县| 辽中县| 怀安县| 康乐县| 芜湖县| 盐池县| 姜堰市| 安图县| 繁昌县| 凉城县| 唐海县| 崇文区| 河北省| 阳信县| 深泽县| 京山县| 濮阳县| 调兵山市| 逊克县| 子长县| 遂昌县| 池州市| 云安县| 隆林| 滕州市| 滨州市| 平顶山市| 台中市| 内江市| 连平县| 镇原县| 米易县| 田东县| 兰溪市| 眉山市| 梅州市| 汉阴县| 拉孜县| 石狮市|