看了一下帮助,貌似没有“日”?Option Description 
\c A counter that increments for each statement you issue 
\D The full current date 
\d The default database 
\h The server host 
\l The current delimiter 
\m Minutes of the current time 
\n A newline character 
\O The current month in three-letter format (Jan, Feb, …) 
\o The current month in numeric format 
\P am/pm 
\p The current TCP/IP port or socket file 
\R The current time, in 24-hour military time (0–23) 
\r The current time, standard 12-hour time (1–12) 
\S Semicolon 
\s Seconds of the current time 
\t A tab character 
\U Your full user_name@host_name account name 
 
\u Your user name 
\v The server version 
\w The current day of the week in three-letter format (Mon, Tue, …) 
\Y The current year, four digits 
\y The 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 
 

解决方案 »

  1.   

    mysql> SELECT CURDATE();
    +------------+
    | CURDATE()  |
    +------------+
    | 2012-06-27 |
    +------------+
    1 row in set (0.02 sec)
      

  2.   

    楼上的,看仔细啦mysql> prompt \U/\d/\Y-\o \R:\m:\s/mysql>
    root@localhost/diffmaker/2012-6-27 14:51:50/mysql>此“日”非彼“日”,我问的是如何显示出上面的红色部分
      

  3.   

    哇,lz 真细心,我找了中文帮助也没看到有:选项 描述
    \v 服务器版本
    \d 当前的数据库
    \h 服务器主机
    \p 当前的TCP/IP端口或套接字文件
    \u 你的用户名
    \U 你的全user_name@host_name账户名
    \\ ‘\’反斜线字符
    \n 新行字符
    \t Tab字符
    \ 空格(反斜线后面的空格)
    \_ 空格
    \R 当前的时间,24-小时军用时间(0-23)
    \r 当前的时间,标准12-小时(1-12)
    \m 当前时间的分钟
    \y 当前的年,两位
    \Y 当前的年,四位
    \D 当前的日期
    \s 当前时间的秒
    \w 当前周的天,3字符格式(Mon,Tue,...)
    \P am/pm
    \o 当前的月,数字格式
    \O 当前的月,3字符格式(Jan,Feb,...)
    \c 随发出的每个语句递增的计数
    \S 分号
    \' 单引号
    \" 双引号
      

  4.   

    只有加入大写的D
    >prompt \Y\D\u@\h(\d) \r:\m:\s>