巧用mysql提示符prompt清晰管理数据库的方法
程序员文章站
2023-11-29 10:32:04
mysql>prompt \u@\h(\d) \r:\m:\s> \u:连接用户 \h:连接主机 \d:连接数据库 \r:\m:\s:显示当前时间 mysql&...
mysql>prompt \u@\h(\d) \r:\m:\s>
\u:连接用户
\h:连接主机
\d:连接数据库
\r:\m:\s:显示当前时间
mysql>prompt \u@\h(\d) \r:\m:\s>
root@localhost(mysql) 08:55:21> status
--------------
mysql ver 14.14 distrib 5.1.33, for win32 (ia32)
connection id: 2
current database: mysql
current user: root@localhost
ssl: not in use
using delimiter: ;
server version: 5.1.33-community-log mysql community server (gpl)
protocol version: 10
connection: localhost via tcp/ip
server characterset: gb2312
db characterset: gb2312
client characterset: latin1
conn. characterset: latin1
tcp port: 3306
uptime: 6 min 6 sec
threads: 2 questions: 867 slow queries: 0 opens: 129 flush tables: 1 open t
ables: 9 queries per second avg: 2.368
--------------
root@localhost(mysql) 08:55:29>
\u:连接用户
\h:连接主机
\d:连接数据库
\r:\m:\s:显示当前时间
mysql>prompt \u@\h(\d) \r:\m:\s>
root@localhost(mysql) 08:55:21> status
--------------
mysql ver 14.14 distrib 5.1.33, for win32 (ia32)
connection id: 2
current database: mysql
current user: root@localhost
ssl: not in use
using delimiter: ;
server version: 5.1.33-community-log mysql community server (gpl)
protocol version: 10
connection: localhost via tcp/ip
server characterset: gb2312
db characterset: gb2312
client characterset: latin1
conn. characterset: latin1
tcp port: 3306
uptime: 6 min 6 sec
threads: 2 questions: 867 slow queries: 0 opens: 129 flush tables: 1 open t
ables: 9 queries per second avg: 2.368
--------------
root@localhost(mysql) 08:55:29>