歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> 查看linux中mysql版本號的方法總結

查看linux中mysql版本號的方法總結

日期:2017/8/19 9:45:30   编辑:Linux技術

  Linux系統下我們通過以下四種方法可以查看到mysql的版本號。下面由學習啦小編整理了查看linux中mysql版本號的方法總結,希望對你有幫助。

  查看linux中mysql版本號的方法總結

  查看mysql版本方法1:在終端下:MySQL -V

  以下是代碼片段:

  [shengting@login ~]$ mysql -V

  mysql Ver 14.7 Distrib 4.1.10a, for redhat-Linux-gnu (i686)

  查看mysql版本方法2:在mysql中:mysql> status;

  以下是代碼片段:

  mysql> status;

  --------------

  mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)

  Connection id: 416

  SSL: Not in use

  Current pager: stdout

  Using outfile: ''

  Using delimiter: ;

  Server version: 3.23.56-log

  Protocol version: 10

  Connection: Localhost via UNIX socket

  Client characterset: latin1

  Server characterset: latin1

  UNIX socket: /tmp/mysql_3311.sock

  Uptime: 62 days 21 hours 21 min 57 sec

  Threads: 1 Questions: 584402560 Slow queries: 424 Opens: 59664208 Flush tables: 1 Open tables: 64 Queries per second avg: 107.551

  查看mysql版本方法3:在help裡面查找

  以下是代碼片段:

  [shengting@login ~]$ mysql --help | grep Distrib

  mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)

  查看mysql版本方法4:使用mysql的函數

  以下是代碼片段:

  mysql> select version();

  +-------------+

  | version() |

  +-------------+

  | 3.23.56-log |

  +-------------+

  1 row in set (0.00 sec)

  補充:查看linux中mysql版本的其他方法

  通過rpm命令查看安裝包得知mysql數據庫版本

  [root@DB-Server ~]# rpm -qa | grep -i mysql

  MySQL-client-5.6.19-1.rhel5

  MySQL-server-5.6.19-1.rhel5

  [root@DB-Server ~]#

Copyright © Linux教程網 All Rights Reserved