查詢方法:1、命令列登入mysql,在輸出的資訊中取得版本號;2、利用navicat連接mysql,右鍵選擇“詳細資料”,在彈窗中查看版本號資訊;3、執行「select version();」語句來查詢;4、執行「status」語句來查詢。
本教學操作環境:linux5.9.8系統、mysql 5.7.17版本、Dell G3電腦。
1、在命令列登入mysql,即可看到mysql的版本號碼
[root@heyong ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 487032Server version: 5.7.17 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>
2、利用navicat連接mysql的用戶端工具可以查看
連線之後右鍵-詳細訊息
3、利用mysql指令查看
mysql> select version(); +-----------+ | version() | +-----------+ | 5.7.17 | +-----------+ 1 row in set (0.01 sec) mysql>
4
#4、在命令列使用status查看
mysql> status -------------- mysql Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using EditLine wrapper Connection id: 488398 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.7.17 MySQL Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /tmp/mysql.sock Uptime: 5 days 10 hours 5 min 40 sec Threads: 154 Questions: 15051829 Slow queries: 0 Opens: 37599 Flush tables: 11 Open tables: 1563 Queries per second avg: 32.138 -------------- mysql>
#5、使用mysql --help | grep Distrib查看
[root@heyong tools]# mysql --help | grep Distrib mysql Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using EditLine wrapper
【相關推薦:mysql影片教學】
#以上是怎麼查詢mysql的版本號的詳細內容。更多資訊請關注PHP中文網其他相關文章!