Sunday, September 30, 2007

MySQL Tip List

Previously, I mentioned an impressive Postgres Tip list. Today I stumbled across a comparable set of tips for MySQL.

Specifically, I was looking for a way to customize the prompt of the mysql command. Here's the tip:

Changing the Mysql client prompt: (Mysql 4.0.2 and higher)


e.g. "prompt \d\R\m>" will show the current database + millitary hour + minutes

Put in my.cnf


I ended up adding the following to ~/.my.cnf:

 prompt="\\u [\\d]> "

There's plenty of other useful tips, so if you are a MySQL user, check them out.

No comments:

Post a Comment