MySQL:查看版本的方法

MySQL 查看版本的方法很多,目前找到以下几种,如下:

方法一: 使用 mysql 命令查看

1
2
[mysql@db1 data]$ mysql --version  
mysql Ver 14.14 Distrib 5.6.20, for Linux (i686) using EditLine wrapper

方法二: 登录的时候查看

1
2
3
4
5
6
7
8
9
10
11
12
[mysql@db1 data]$ mysql  
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 805
Server version: 5.6.20-log Source distribution

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

备注:接连接数据库,开始的提示信息有版本信息

方法三: 使用函数查看

1
2
3
4
5
6
7
root@localhost:(none)>select version();  
+------------+
| version() |
+------------+
| 5.6.20-log |
+------------+
1 row in set (0.00 sec)

方法四: Status 命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
root@localhost:(none)>status  
--------------
mysql Ver 14.14 Distrib 5.6.20, for Linux (i686) using EditLine wrapper

Connection id: 805
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.20-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: /tmp/mysql.sock
Uptime: 20 hours 36 min 32 sec

Threads: 3 Questions: 336 Slow queries: 0 Opens: 93 Flush tables: 1 Open tables: 86 Queries per second avg: 0.004
------------

原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/239603.html

(0)
上一篇 2022年2月12日
下一篇 2022年2月12日

相关推荐

发表回复

登录后才能评论