下面一起來(lái)了解下MySQL版本查看方法,相信大家看完肯定會(huì)受益匪淺,文字在精不在多,希望MySQL版本查看方法這篇短內(nèi)容是你想要的。
創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站制作、成都網(wǎng)站制作、集安網(wǎng)絡(luò)推廣、微信小程序開(kāi)發(fā)、集安網(wǎng)絡(luò)營(yíng)銷、集安企業(yè)策劃、集安品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營(yíng)等,從售前售中售后,我們都將竭誠(chéng)為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供集安建站搭建服務(wù),24小時(shí)服務(wù)熱線:18982081108,官方網(wǎng)址:www.cdcxhl.com
1. 沒(méi)有連接到MySQL云服務(wù)器,就想查看MySQL的版本。打開(kāi)cmd,切換至mysql的bin目錄,運(yùn)行下面的命令即可:
e:\mysql\bin>mysql -V
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
(版本為 5.6.32)
或者:
e:\mysql\bin>mysql -v
這個(gè)命令可以查看到更為詳細(xì)的信息,因?yàn)樗鼤?huì)用賬號(hào) ODBC,連接上MySQL云服務(wù)器,默認(rèn)連接到localhost上的3306端口。
或者:
e:\mysql\bin>mysql --help | find "Distrib"
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
這種方式只有windows系統(tǒng)下才可用,因?yàn)閣indows中才用find命令查找字符串,且后面的字符串必須用雙引號(hào)包裹起來(lái),而linux系統(tǒng)下雖然也是用 | 作為管道符,卻是使用grep命令查找字符串(如:mysql --help | grep Distrib)。
2. 如果已經(jīng)連接到了MySQL云服務(wù)器,則運(yùn)行下面的命令:
mysql> select version();
+------------+
| version() |
+------------+
| 5.6.32-log |
+------------+
1 row in set (0.00 sec)
或者:
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
Connection id: 9
Current database:
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.6.32-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: gbk
Conn. characterset: gbk
TCP port: 3307
Uptime: 4 hours 7 min 11 sec
Threads: 4 Questions: 126 Slow queries: 0 Opens: 73 Flush tables: 1 Open tables: 66 Queries per second avg: 0.008
或者:
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
Connection id: 9
Current database:
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.6.32-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: gbk
Conn. characterset: gbk
TCP port: 3307
Uptime: 4 hours 9 min 29 sec
Threads: 4 Questions: 144 Slow queries: 0 Opens: 73 Flush tables: 1 Open tables: 66 Queries per second avg: 0.009
3. 在命令行連接上MySQL云服務(wù)器時(shí),其實(shí)就已經(jīng)顯示了MySQL的版本,如:
e:\mysql\bin>mysql -uroot -p -P3307
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.6.32-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
看完MySQL版本查看方法這篇文章后,很多讀者朋友肯定會(huì)想要了解更多的相關(guān)內(nèi)容,如需獲取更多的行業(yè)信息,可以關(guān)注我們的行業(yè)資訊欄目。