查看mysql版本的四種方法

1:在終端下:mysql -V。 如下是代碼片斷:mysql



[root@yutian01 ~]# mysql -vsql

Welcome to the MySQL monitor.  Commands end with ; or \g.app

Your MySQL connection id is 11socket

Server version: 5.6.16-log Source distributionide


Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights 函數


reserved.it


Oracle is a registered trademark of Oracle Corporation and/or itsio

affiliates. Other names may be trademarks of their respectivetable

owners.class



2:在mysql中:mysql> status;

如下是代碼片斷:

mysql> status

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

mysql  Ver 14.14 Distrib 5.6.16, for Linux (x86_64) using  EditLine 


wrapper


Connection id:          11

Current database:

Current user:           root@localhost

SSL:                    Not in use

Current pager:          stdout

Using outfile:          ''

Using delimiter:        ;

Server version:         5.6.16-log Source distribution

Protocol version:       10

Connection:             Localhost via UNIX socket

Server characterset:    utf8

Db     characterset:    utf8

Client characterset:    utf8

Conn.  characterset:    utf8

UNIX socket:            /usr/local/mysql/mysqld.sock

Uptime:                 3 hours 1 min 17 sec


Threads: 1  Questions: 223  Slow queries: 0  Opens: 86  Flush tables: 9 


 Open tables: 3  Queries per second avg: 0.020

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



3:在help裏面查找

如下是代碼片斷:

[root@yutian01 ~]# mysql --help | grep Distrib

mysql  Ver 14.14 Distrib 5.6.16, for Linux (x86_64) using  EditLine 


wrapper



4:使用mysql的函數

如下是代碼片斷:

mysql> select version();

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

| version()  |

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

| 5.6.16-log |

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

1 row in set (0.00 sec)

相關文章
相關標籤/搜索