码迷,mamicode.com
首页 > 数据库 > 详细

mysql 查看版本的四种方法

时间:2015-11-16 17:36:41      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

1:在终端下:mysql -V。 以下是代码片段:

  [shengting@login ~]$ mysql -V
 mysql  Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64)

2:在mysql中:mysql> status;
  以下是代码片段:
  mysql> status;

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

mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64) using readline 6.3

Connection id: 4393
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ‘‘
Using delimiter: ;
Server version: 5.5.46-0ubuntu0.14.04.2 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 3 days 22 hours 58 min 49 sec

Threads: 1 Questions: 141473 Slow queries: 0 Opens: 81 Flush tables: 1 Open tables: 74 Queries per second avg: 0.413

3:在help里面查找
  以下是代码片段:
  [shengting@login ~]$ mysql --help | grep Distrib
  mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)

4:使用mysql的函数
  以下是代码片段:
  mysql> select version();
  +-------------+
  | version()   |
  +-------------+
  | 3.23.56-log |
  +-------------+
  1 row in set (0.00 sec)

mysql 查看版本的四种方法

标签:

原文地址:http://www.cnblogs.com/jiagouzhilu/p/4969348.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!