确定MySQL服务器软件的确切版本号的查询语法是什么?
答案 0 :(得分:11)
您可以使用SHOW VARIABLES
:
SHOW VARIABLES WHERE Variable_name = 'version';
答案 1 :(得分:3)
选择版本();
答案 2 :(得分:2)
命令行:
mysql --version
答案 3 :(得分:0)
除了已经提到的解决方案,如果在shell中键入mysql
,您只需查看版本即可。你会得到这样的东西:
[nikola@localhost]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 386102
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, 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.
您可以看到版本在Server version: 5.1.61 Source distribution
行中打印。