Windows下查看MySQL安装版本
- 登录MySQL后, mysql> show variables like ‘%version_%’;
mysql> show variables like "%version%";
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| innodb_version | 5.7.20 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1 |
| version | 5.7.20-log |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | AMD64 |
| version_compile_os | Win32 |
+-------------------------+------------------------------+
8 rows in set, 1 warning (0.00 sec)
C:\Users\zbb>mysql -V
mysql Ver 14.14 Distrib 5.7.20, for Win32 (AMD64)
- mysql --help | find “Distrib”
这种方式只有windows系统下才可用,因为windows中才用find命令查找字符串,且后面的字符串必须用双引号包裹起来,而linux系统下虽然也是用 | 作为管道符,却是使用grep命令查找字符串(如:mysql --help | grep Distrib)。
C:\Users\zbb>mysql --help | find "Distrib"
mysql Ver 14.14 Distrib 5.7.20, for Win32 (AMD64)