Description:
I have been normally been setting the prompt on many systems by doing this:
mysql='mysql --prompt="\u@$(hostname -s) [\d]>\_"'
This gives a prompt like:
root@myhostname [(none)]> or
root@myhostname [db1]>
However, sometimes it's good to know when a command was run when looking back so I wanted to add a timestamp prompt.
Couldn't find the required options.
How to repeat:
http://dev.mysql.com/doc/refman/5.6/en/mysql-commands.html gives the info on options to the prompt line.
\D says 'The full current date' but it really means the date, but appears to be the locale specific, such as: Mon Apr 27 14:59:13 CEST 2015, in my case. It would be good to be a bit more specific.
\R and \r mention "time" but actually mean the "hour". Confusing when comparing to the strftime(3) values.
I see the \O for the current month number but see no way to specify explicitly the day-of-the-month. Today in ISO 8601 format is 2015-04-27, so I'm looking for a way to make the prompt look like:
27-APR 15:05:08[X] root@myhostname [mydb]> where X = \c
but currently don't see a way to configure this.
The prompt would already be quite long which is why I'm trying to avoid the full ISO YYYY-MM-DD format.
Suggested fix:
So unless I've misread the documentation please add a day-of-the-month option as the other required settings seems to be there. I guess as with the hour settings there may be a need to provide a value which has a leading 0 and one without. Personally the leading zero version is what I'm looking for.
I assume that 5.7 behaves the same.