How to check the MySQL version
Process of checking the MySQL version
Certain pre-requisites that need to be kept in mind-
- The instructions that are listed out are for the purpose of checking the MySQL version on your web server.
- As an FYI, users need to know that we are logged in as root and we are working from a Liquid Web Core Managed CentOS 7 server.
Head to the command line and enter the following command/code-
1 |
mysql –v |
The command on execution should give a response that is similar to the following line of code-
mysql Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64) using readline 5.1
- Once done, head to the MySQL Command Client.
The time you connect to the MySQL with the help of a command client and you use the following command, the current version of the MySQL server will be shown to you
1 |
mysql |
Once again, the response you get on execution should be-
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement
1 |
MariaDB [(none)]> |
The server version in this example is Server version: 5.5.41-MariaDB MariaDB Server.
You can also easily run the following command after you are connected to the MySQL Command Client-
1 |
SHOW VARIABLES LIKE “%version%”; |
Once executed, the result that comes should be-
+————————-+———————+
| Variable_name | Value |
+————————-+———————+
| innodb_version | 5.5.40-MariaDB-36.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.41-MariaDB |
| version_comment | MariaDB Server |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+————————-+———————+
7 rows in set (0.10 sec)
In this manner you can easily check the version of the MySQL that resides on your web server. We hope the tutorial and the codes were beneficial.