MySQL查看版本的方法

  1. mysql -V
適用場景:系統中配置了MySQL的環境變量
顯示內容:
mysql  Ver 14.14 Distrib 5.5.37, for Win64 (x86)

2.  mysql -u username -p

適用場景:系統中配置了MySQL的環境變量

顯示內容:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.37 MySQL Community Server (GPL)


Copyright (c) 2000, 2014, 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.

3. status

適用場景:登錄MySQL賬戶後
顯示內容:
mysql  Ver 14.14 Distrib 5.5.37, for Win64 (x86)


Connection id:          3
Current database:
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.5.37 MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 19 min 30 sec

4. SELECT version();

適用場景:登陸MySQL賬戶後

顯示內容:
+-----------+
| version() |
+-----------+
| 5.5.37    |
+-----------+

5. mysql --help | grep Distrib
適用場景:Linux環境下,console裏直接輸入

顯示內容:
msql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2
發佈了22 篇原創文章 · 獲贊 2 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章