巧用mysql提示符prompt清晰管理數(shù)據(jù)庫的方法
更新時(shí)間:2009年08月11日 11:10:14 作者:
隨著管理mysql服務(wù)器越來越多,同樣的mysql>的提示符有可能會(huì)讓你輸入錯(cuò)誤的命令到錯(cuò)誤的數(shù)據(jù)庫,這時(shí)候需要巧用mysql的提示符,這是我的提示符root@localhost(mysql) 08:55:21> 用prompt命令實(shí)現(xiàn)(適用于windows和linux環(huán)境)
mysql>prompt \u@\h(\d) \r:\m:\s>
\u:連接用戶
\h:連接主機(jī)
\d:連接數(shù)據(jù)庫
\r:\m:\s:顯示當(dāng)前時(shí)間
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:連接主機(jī)
\d:連接數(shù)據(jù)庫
\r:\m:\s:顯示當(dāng)前時(shí)間
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>
相關(guān)文章
mysql之關(guān)于CST和GMT時(shí)區(qū)時(shí)間轉(zhuǎn)換方式
這篇文章主要介紹了mysql之關(guān)于CST和GMT時(shí)區(qū)時(shí)間轉(zhuǎn)換方式,具有很好的參考價(jià)值,希望對大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-10-10MySQL中主鍵為0與主鍵自排約束的關(guān)系詳解(細(xì)節(jié))
這篇文章主要給大家介紹了關(guān)于MySQL中主鍵為0與主鍵自排約束的關(guān)系的相關(guān)資料,主要介紹的是其中的一些非常細(xì)的細(xì)節(jié),對大家學(xué)習(xí)或者使用mysql具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-05-05mysql 5.7.13 安裝配置方法圖文教程(win10)
這篇文章主要為大家分享了mysql 5.7.13 安裝配置方法圖文教程,感興趣的朋友可以參考一下2016-06-06mysql關(guān)聯(lián)子查詢的一種優(yōu)化方法分析
這篇文章主要介紹了mysql關(guān)聯(lián)子查詢的一種優(yōu)化方法,結(jié)合實(shí)例形式分析了針對MySQL的關(guān)聯(lián)子查詢進(jì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