The prompt command supports a number of options that allow you to display the mysql prompt in various ways.
Option Description
\ Space (A space follows the backslash.)
\_ Space
\\ Backslash
\c A counter that increments by one for each statement that you execute (This option is not the same as the mysql clear (\c) command. The \c option shown here is specifically used as a switch for the prompt command.)
\d Current database
\D Current date
\h Server host
\m Minutes from current time
\n New line (no prompt)
\o Current month (numeric format)
\O Current month (three-letter format)
\p Current socket name, port number, or named pipe
\P a.m./p.m.
\r Current time (12-hour clock)
\R Current time (24-hour clock)
\s Seconds of the current time
\t Tab
\u Username
\U Username and hostname
\v Version of server
\w Current day of the week (three-letter format)
\y Current year (two-digit format)
\Y Current year (three-digit format)
Related examples in the same category