Their could many ways to find MySQL Server and client version. but in this post we will how to check MySQL Server and client version through MySQL server and client itself.

MySQL Client version

For MySQL client version , OS administrator could search for package installation databases which would mentioned which version is installed on machine, but what if you don’t have permission to Administrative commands. For MySQL Client , binary itself has options for same like below.

# mysql --version
mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1

# mysql -V
mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1

So either with –version option or with -V, we could find out version number of MySQL client

MySQL Server version

For MySQL Server, we could query in database for same like below mentioned .

mysql> show variables where Variable_name = "version";
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| version       | 5.1.73 |
+---------------+--------+
1 row in set (0.00 sec)

mysql> show variables like "%version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| protocol_version        | 10                  |
| version                 | 5.1.73              |
| version_comment         | Source distribution |
| version_compile_machine | x86_64              |
| version_compile_os      | redhat-linux-gnu    |
+-------------------------+---------------------+
5 rows in set (0.00 sec)

mysql> Bye

With above way, we can identify MySQL Server version from Database itself.