巧用mysql提示符prompt清晰管理數(shù)據庫的方法
更新時間:2009年08月11日 11:10:14 作者:
隨著管理mysql服務器越來越多,同樣的mysql>的提示符有可能會讓你輸入錯誤的命令到錯誤的數(shù)據庫,這時候需要巧用mysql的提示符,這是我的提示符root@localhost(mysql) 08:55:21> 用prompt命令實現(xiàn)(適用于windows和linux環(huán)境)
mysql>prompt \u@\h(\d) \r:\m:\s>
\u:連接用戶
\h:連接主機
\d:連接數(shù)據庫
\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:連接數(shù)據庫
\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>
相關文章
MySQL中主鍵為0與主鍵自排約束的關系詳解(細節(jié))
這篇文章主要給大家介紹了關于MySQL中主鍵為0與主鍵自排約束的關系的相關資料,主要介紹的是其中的一些非常細的細節(jié),對大家學習或者使用mysql具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2018-05-05mysql 5.7.13 安裝配置方法圖文教程(win10)
這篇文章主要為大家分享了mysql 5.7.13 安裝配置方法圖文教程,感興趣的朋友可以參考一下2016-06-06mysql關聯(lián)子查詢的一種優(yōu)化方法分析
這篇文章主要介紹了mysql關聯(lián)子查詢的一種優(yōu)化方法,結合實例形式分析了針對MySQL的關聯(lián)子查詢進行優(yōu)化的技巧,需要的朋友可以參考下2016-04-04The MySQL server is running with the --read-only option so i
1209 - The MySQL server is running with the --read-only option so it cannot execute this statement2020-08-08