Mysql:查看Mysql版本号

Mysql:查看Mysql版本号

  • 方法一**【推荐】**:
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.15    |
+-----------+
1 row in set (0.00 sec)
  • 方法二:
mysql> status
--------------
mysql  Ver 8.0.15 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

Connection id:		613
Current database:	
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		8.0.15 MySQL Community Server - GPL
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4
UNIX socket:		/tmp/mysql.sock
Uptime:			5 days 8 hours 37 min 21 sec

Threads: 37  Questions: 6324  Slow queries: 15  Opens: 757  Flush tables: 3  Open tables: 411  Queries per second avg: 0.013
--------------
  • 方法三:
mysql> \s
--------------
mysql  Ver 8.0.15 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

Connection id:		613
Current database:	
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		8.0.15 MySQL Community Server - GPL
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4
UNIX socket:		/tmp/mysql.sock
Uptime:			5 days 8 hours 37 min 45 sec

Threads: 37  Questions: 6327  Slow queries: 15  Opens: 757  Flush tables: 3  Open tables: 411  Queries per second avg: 0.013
--------------
  • 方法四:
mysql> show variables like "%version%";
+--------------------------------------------------+------------------------------+
| Variable_name                                    | Value                        |
+--------------------------------------------------+------------------------------+
| group_replication_allow_local_lower_version_join | OFF                          |
| immediate_server_version                         | 999999                       |
| innodb_version                                   | 8.0.15                       |
| original_server_version                          | 999999                       |
| protocol_version                                 | 10                           |
| slave_type_conversions                           |                              |
| tls_version                                      | TLSv1,TLSv1.1,TLSv1.2        |
| version                                          | 8.0.15                       |
| version_comment                                  | MySQL Community Server - GPL |
| version_compile_machine                          | x86_64                       |
| version_compile_os                               | linux-glibc2.12              |
| version_compile_zlib                             | 1.2.11                       |
+--------------------------------------------------+------------------------------+
12 rows in set (0.00 sec)
  • 方法五:
$ mysql -V
mysql  Ver 8.0.15 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值