重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
查看mysql版本的四种方法
10年积累的网站制作、成都网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站制作后付款的网站建设流程,更有鹤山免费网站建设让你可以放心的选择与我们合作。
1:在终端下:mysql -V。 以下是代码片段:
[shengting@login ~]$ mysql -V
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)
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
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)
查看版本信息
#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
查看mysql版本的四种方法
1:在终端下:mysql -V。 以下是代码片段:
[shengting@login ~]$ mysql -V
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)
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
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)