Mysql查看版本号的五种方式介绍
程序员文章站
2024-02-22 21:09:10
查看版本信息 #1使用命令行模式进入mysql会看到最开始的提示符 your mysql connection id is 3 server version: 5.1.69...
查看版本信息
#1使用命令行模式进入mysql会看到最开始的提示符
your mysql connection id is 3
server version: 5.1.69 source distribution
#2命令行中使用status可以看到
mysql> status;
--------------
mysql ver 14.14 distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1
connection id:3
current database:
current user: root@localhost
ssl: not in use
current pager:stdout
using outfile:''
using delimiter:;
server version:5.1.69 source distribution
protocol version:10
connection: localhost via unix socket
server characterset:utf8
db characterset:utf8
client characterset:utf8
conn. characterset:utf8
unix socket: /var/lib/mysql/mysql.sock
uptime: 3 days 14 hours 50 sec
threads: 1 questions: 5 slow queries: 0 opens: 15 flush tables: 1 open tables: 8 queries per second avg: 0.0
#3 使用系统函数
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.1.69 |
+-----------+
1 row in set (0.12 sec)
#4 $ mysql --help | grep distrib
mysql ver 14.14 distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1
#5 包管理工具(根据不同系统 rh系列或则是bsd系列)
$ rpm -qa|grep mysql
qt-mysql-4.6.2-20.el6.x86_64
mysql-server-5.1.69-1.el6_4.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64
mysql-5.1.69-1.el6_4.x86_64
mysql-devel-5.1.69-1.el6_4.x86_64
ref:www.cnblogs.com/end/archive/2011/10/18/2216461.html
#1使用命令行模式进入mysql会看到最开始的提示符
your mysql connection id is 3
server version: 5.1.69 source distribution
#2命令行中使用status可以看到
复制代码 代码如下:
mysql> status;
--------------
mysql ver 14.14 distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1
connection id:3
current database:
current user: root@localhost
ssl: not in use
current pager:stdout
using outfile:''
using delimiter:;
server version:5.1.69 source distribution
protocol version:10
connection: localhost via unix socket
server characterset:utf8
db characterset:utf8
client characterset:utf8
conn. characterset:utf8
unix socket: /var/lib/mysql/mysql.sock
uptime: 3 days 14 hours 50 sec
threads: 1 questions: 5 slow queries: 0 opens: 15 flush tables: 1 open tables: 8 queries per second avg: 0.0
#3 使用系统函数
复制代码 代码如下:
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.1.69 |
+-----------+
1 row in set (0.12 sec)
#4 $ mysql --help | grep distrib
mysql ver 14.14 distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1
#5 包管理工具(根据不同系统 rh系列或则是bsd系列)
$ rpm -qa|grep mysql
qt-mysql-4.6.2-20.el6.x86_64
mysql-server-5.1.69-1.el6_4.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64
mysql-5.1.69-1.el6_4.x86_64
mysql-devel-5.1.69-1.el6_4.x86_64
ref:www.cnblogs.com/end/archive/2011/10/18/2216461.html