MYSQL接続時にプロンプトを変更して自分の接続を状態を把握。
通常接続
[root@colinux mysql5130]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.30 MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
PROMPTを変更して接続状態をわかり易くした場合
[root@colinux mysql5130]# mysql -u root -p –prompt=”\u@\h-DB:\d>”
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.30 MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
root@localhost-DB:(none)>use test
Database changed
root@localhost-DB:test>

MYSQL PROMPT