In this guide you will be able to learn how you can check version of MySQL or MariaDB, before you start working on a project probably you want to know current version in order to determine the current version you have to follow the following steps.

How to check via command line ?

You will need to simply open command line. and run following command.

mysql -V

How to check via SSH ?

  1. First login to SSH using root credentials
  2. Login to MySQL using following command
mysql -u root -p

Enter password. once logged run enter this command now and hit enter.

SHOW VARIABLES LIKE "%version%";

You should expect response like this for example.

+-------------------------+----------------------------+
| Variable_name           | Value                      |
+-------------------------+----------------------------+
| innodb_version          | 5.7                        |
| protocol_version        | 10                         |
| slave_type_conversions  |                            |
| version                 | 10.2-MariaDB               |
| version_comment         | MariaDB Server             |
| version_compile_machine | x86_64                     |
| version_compile_os      | Linux                      |
| version_malloc_library  | system                     |
| version_ssl_library     | OpenSSL 1.1.0g  2 Nov 2017 |
| wsrep_patch_version     | wsrep_25.21                |
+-------------------------+----------------------------+
10 rows in set (0.02 sec)

Good Luck!

(Visited 224 times, 1 visits today)