In this article, you will know how to check the version of a MySQL server, in the case you have errors that related to your website data, if you know the version of MySQL then you can quickly fix the errors. As we have to know MySQL is one of the most popular relational database management system and is used by many webmasters to manage databases for their websites. However, this RDBMS have many different versions, and each version has its unique features that you need to know to choose the best version for your website. Let’s start testing the version of Mysql that your website is using.
The condition for you to check the version successfully is that you need to log in to ssh as root. At SSH, type:
MySQL -V
The result can be returned.
MySQL Ver 15.1 Distrib 10.1.34-MariaDB, for Linux (x86_64) using readline 5.1
From within the MySQL client, you can also run the following command for more details:
SHOW VARIABLES LIKE “%version%”;
+-------------------------+----------------------------+ | Variable_name | Value | +-------------------------+----------------------------+ | innodb_version | 5.6.36-82.2 | | protocol_version | 10 | | slave_type_conversions | | | version | 10.1.34-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)
In the result above, you can find additional version details about your installed MySQL such as protocol_version, innodb_version, version_ssl_library, slave_type_conversions, and more.