What\'s the query syntax to determine the exact version number of the MySQL server software?
You can use SHOW VARIABLES:
SHOW VARIABLES WHERE Variable_name = 'version';
Command line:
mysql --version
select version();
Besides the already mentioned solutions you can simply see the version if you type mysql
in your shell. You will get something like this:
[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.
Where you can see that the version is printed in the line Server version: 5.1.61 Source distribution
.