How to Check MySQL Version

It is important to know your MySQL version to understand its features and make the most of it. Here’s how to check MySQL version for your server. In this article we will look at how to check MySQL version in XAMPP, Workbench, PHPMyAdmin and Terminal. You can also use it to check MySQL version number in Ubuntu, Debian, CentOS, Windows, Mac and other systems.

 

How to Check MySQL Version

Here are the steps to check MySQL version in XAMPP, Workbench, PHPMyAdmin and Terminal.

 

How to Check MySQL Version in Terminal

Open terminal and type any of the following commands to get MySQL version from terminal. You can also use these commands to check MySQL version in Mac, Linux.

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.2

 

Or use the following command. Every time you log into MySQL server, it will automatically display MySQL version number on line 3 of the output.

$ mysql -v
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 107168
Server version: 5.5.41-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2014, 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.

Reading history-file /home/ubuntu/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

Bonus Read : How to Disable Foreign Key Check in MySQL

 

Or you can use the STATUS command, after you log into MySQL Server

mysql> STATUS
--------------
mysql  Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.
Connection id:          107242
Current database:
Current user:           ubuntu@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.41-0ubuntu0.12.04.1 (Ubuntu)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 15 days 18 hours 50 min 54 sec

Threads: 2  Questions: 2243580  Slow queries: 0  Opens: 3871  Flush tables: 1  
Open tables: 182  Queries per second avg: 1.645
--------------

 

Or you can use a select statement for @@version system variable, after you log into MySQL Server

mysql> select @@version;
--------------
select @@version
--------------

+-------------------------+
| @@version               |
+-------------------------+
| 5.5.41-0ubuntu0.12.04.1 |
+-------------------------+
1 row in set (0.00 sec)

 

Bonus Read : How to Create Sequence in MySQL

 

Or you can use a SHOW VARIABLES statement for system variables that contain the string “version” in it, after you log into MySQL Server

mysql> SHOW VARIABLES LIKE "version";
--------------
SHOW VARIABLES LIKE "version"
--------------

+-------------------------+-------------------------+
| Variable_name           | Value                   |
+-------------------------+-------------------------+
| version                 | 5.5.41-0ubuntu0.12.04.1 |
+-------------------------+-------------------------+

 

How to Check MySQL Version in PHPMyAdmin

To check MySQL version in PHPMyAdmin, open PHPMyAdmin. On the main page, you will see a block widget called “Database Server” on right pane. In this block, you will find information related to your MySQL database server.

Look for a line starting with “Server Version” or “Software Version” depending on your PHPMyAdmin version. You will find your MySQL Server database version in it.

check mysql version phpmyadmin linux

 

Bonus Read : How to Compare Two Tables in MySQL

 

How to Check MySQL Version in Workbench

To check MySQL version in Workbench, open Workbench. Click on your database server from main menu, and then click “server status”

You will see a window as shown below, that displays all the key information about your MySQL server, including its version.

check mysql version number in workbench

 

Bonus Read : How to Get Last One Month Data in MySQL

 

How to Check MySQL Version in XAMPP

Open Windows DOS/Shell, navigate to the folder XAMPP is installed (e.g c:\xampp) and run the following command

c:\xampp\mysql\bin>mysql -V
mysql  Ver 15.1 Distrib 5.4.1, for Win32 (AMD64)

 

Alternatively, you will find a readme_en.txt file in your xampp installation folder. It will contain MySQL version number used for xampp installation, and looks something like the following.

+ Apache 2.4.41
  + MySQL 5.4.11
  + PHP 7.4.2 (VC15 X86 64bit thread safe) + PEAR
  + phpMyAdmin 5.0.1
  + OpenSSL 1.1.0g
  + ADOdb 518a
  + Mercury Mail Transport System v4.63 (not included in the portable version)
  + FileZilla FTP Server 0.9.41 (not included in the portable version)
  + Webalizer 2.23-04 (not included in the portable version)
  + Strawberry Perl 5.16.3.1 Portable
  + Tomcat 7.0.99
  + XAMPP Control Panel Version 3.2.4.

 

Ubiq makes it easy to visualize data in minutes, and monitor in real-time dashboards. Try it Today!