查看MySQL版本号

1、未进入MySQL时查询:

1、mysql -V查询
C:\Users>mysql -V
mysql  Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)

2、或者 mysql --version
C:\Users>mysql --version
mysql  Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)

2、进入MySQL后查询

方式一
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.12    |
+-----------+
1 row in set (0.00 sec)

方式二

mysql> SHOW VARIABLES LIKE '%version%';
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| innodb_version          | 8.0.12                       |
| protocol_version        | 10                           |
| slave_type_conversions  |                              |
| tls_version             | TLSv1,TLSv1.1,TLSv1.2        |
| version                 | 8.0.12                       |
| version_comment         | MySQL Community Server - GPL |
| version_compile_machine | x86_64                       |
| version_compile_os      | Win64                        |
| version_compile_zlib    | 1.2.11                       |
+-------------------------+------------------------------+
9 rows in set, 1 warning (0.00 sec)

方式三

mysql> status
--------------
mysql  Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)

Connection id:          152
Current database:
Current user:           root@localhost
SSL:                    Cipher in use is DHE-RSA-AES128-GCM-SHA256
Using delimiter:        ;
Server version:         8.0.12 MySQL Community Server - GPL
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 4 days 3 hours 54 min 37 sec

Threads: 2  Questions: 3744  Slow queries: 0  Opens: 9056  Flush tables: 2  Open tables: 256  Queries per second avg: 0.010
--------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值