Find Out MySQL Version

How do I find out mysql version under Linux or Unix operating systems?

To find out the version and release of your currently installed MySQL server installation, type any one of the following command:
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
[a] Sql commands


[b] mysql client

[c] The STATUS command

[d] The mysqladmin version command

[e] Package manger

Example: Sql commands

mysql -u root -p -e 'SHOW VARIABLES LIKE "%version%";'

Sample outputs:

Enter password: 
| Variable_name           | Value               |
| protocol_version        | 10                  |
| version                 | 5.1.66-log          |
| version_comment         | Source distribution |
| version_compile_machine | x86_64              |
| version_compile_os      | redhat-linux-gnu    |

Or type the following command:
mysql -u root -p -e ' SELECT VERSION(); '
Sample outputs:

Enter password: 
| VERSION()  |
| 5.1.66-log |

Example: STATUS command

Type the following command
mysql -u root -p -e 'STATUS'
Sample outputs:

Fig.01: Check Your MySQL Version - What Version of MySQL am I Running?

Fig.01: Check Your MySQL Version – What Version of MySQL am I Running?

Example: mysqladmin command

Type the following command:
mysqladmin -u root -p version

Enter password: 
mysqladmin  Ver 8.42 Distrib 5.1.66, for redhat-linux-gnu on x86_64
Copyright (c) 2000, 2012, 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
Server version		5.1.66-log
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/lib/mysql/mysql.sock
Uptime:			44 days 56 min 47 sec

Examples: Package manger

Type the following command if you are using Fedora / RHEL / Red Hat / CentOS Linux:
$ rpm -qa | grep mysql
$ yum info mysql-server
Sample outputs:

Loaded plugins: auto-update-debuginfo, protectbase, rhnplugin
0 packages excluded due to repository protections
Installed Packages
Name        : mysql-server
Arch        : x86_64
Version     : 5.1.66
Release     : 2.el6_3
Size        : 25 M
Repo        : installed
From repo   : rhel-x86_64-server-6
Summary     : The MySQL server and related files
URL         :
License     : GPLv2 with exceptions
Description : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
            : client/server implementation consisting of a server daemon (mysqld)
            : and many different client programs and libraries. This package contains
            : the MySQL server and some accompanying files and directories.

If you are using Debian / Ubuntu Linux, type the following command:
$ dpkg --list | egrep 'mysql-(server|client)'
Sample outputs:

ii  mysql-client-5.1                         5.1.66-0+squeeze1                  MySQL database client binaries
ii  mysql-server-5.1                         5.1.66-0+squeeze1                  MySQL database server binaries and system database setup
ii  mysql-server-core-5.1                    5.1.66-0+squeeze1                  MySQL database server binaries
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.