linux查看mysql版本号

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

[shengting@login ~]$ mysql -V
mysql  Ver 14.14 Distrib 5.1.49, for redhat-linux-gnu (i686) using readline 5.1


2:在mysql中:mysql> status;

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.1.49, for redhat-linux-gnu (i686) using readline 5.1

Connection id:          444
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.1.49 MySQL Community Server (GPL) by Remi
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 1 day 4 hours 15 min 29 sec

Threads: 3  Questions: 364  Slow queries: 0  Opens: 99  Flush tables: 1  Open tables: 23  Queries per second avg: 0.3
--------------
3:在help里面查找

以下是代码片段:

[shengting@login ~]$ mysql --help | grep Distrib
mysql  Ver 14.14 Distrib 5.1.49, for redhat-linux-gnu (i686) using readline 5.1


4:使用mysql的函数

以下是代码片段:

mysql> select version();
+-------------+
| version()   |
+-------------+
|'5.1.56-community' |
+-------------+
1 row in set (0.00 sec)

你可能感兴趣的:(linux)