| Showing entries 1 to 3 |
I manage several mysql servers and often on these servers for security reasons the SUPER account is not allowed external network access, so access is made to localhost. When connecting to several hosts at the same time, for example from different ssh sessions, this can be inconvenient as the \h prompt only ever shows localhost and not the hostname of the server to which I’m connected.
The following small patch against 5.1.36 which can also be found here adds a new \H option which behaves the same as \h except in this case the hostname is shown.
diff --git a/Docs/mysql.info b/Docs/mysql.info index 7747201..dffacfd 100644 --- a/Docs/mysql.info +++ b/Docs/mysql.info @@ -20512,6 +20512,8 @@ sequences. `\D' The full current date `\d' The default[Read more...]
It’s always the little things in life. One of the things that has been a very “little thing” that causes a lot of frustration while writing The MySQL Administrator’s Bible is the prompt. Specifically, the fact that you can only change the first line of the prompt, but not the subsequent lines.
The default prompt that appears on the first line of the prompt is:
mysql>
The default (and unchangeable) second line of the prompt is four spaces followed by an ASCII arrow:
->
The second line of the prompt is hard-coded to match up very nicely with the first line in a fixed-width font:
mysql> SELECT
-> 1+2;
However, you can change the prompt, which is pretty handy:
mysql> prompt \d:[Read more...]
| Showing entries 1 to 3 |