在终端中,键入mysql -V
(大写V)以显示服务器上安装的当前MySQL版本。
Terminal
$ mysql -V
mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
或者,登录到MySQL控制台并发出MySQL命令,如下所示:
Terminal
$ mysql -u root -p
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| innodb_version | 5.7.24 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1 |
| version | 5.7.24 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+------------------------------+
8 rows in set (0.00 sec)
参考文献
标签: MySQL