How to Check MySQL Version via The Command Line

Most web applications run on MySQL databases. Aside from being free, though a priced proprietary enterprise solution exists, the software is impressively reliable; it’s easy to use and super-secured.

MySQL can handle millions of queries and supports high-speed transactional processing for eCommerce websites.

The first version of MySQL appeared in 1995, and today, over ten other versions exist.

Knowing your MySQL version will help you figure out the configuration changes and other settings you’ll need to maintain to keep your applications running perfectly.

This article will guide you on how to check the MySQL version via the command line. And you could check your MySQL version in two ways.

Let’s take a look at them.

Method 1: SSH Shell

The secured socket shell is a network protocol that allows two computers to communicate and reliably share data. 

Webmasters and Database Administrators often use SSH to log in to a remote computer and perform tasks on the server from anywhere. The fantastic thing with SSH is that it’ll you to perform these tasks as if you’re physically in front of the server.

The SSH encrypts the communication between the two computers, so you’ve nothing to worry about data breaches, even if you’re running the commands over an unsecured network.

But to use SSH on your Windows computer, you’d need to install an SSH client on your local computer and connect it to your server. You could consider using Putty. It’s a reliable and intuitive SSH client for Windows users.

Some operating systems like macOS and Linux have an in-built SSH Terminal, so you don’t have to install an SSH client.

When logged in and connected to your server, you could now perform tasks remotely on your server using the command line.

To check the version your MySQL is running, type and execute mysql -v in the command line.

When you do, MySQL will return the result as thus:

mysql Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using EditLine wrapper

As you could see, the MySQL version for this system is 5.6.38.

Method 2: MySQL Shell

The MySQL Shell is an advanced client and code editor for MySQL. It provides scripting capabilities for JavaScript and Python and includes APIs for working with MySQL.

Webmasters use MySQL shell to perform data queries and updates, as well as various administrative operations.

To check the MySQL version from the MySQL Shell, type mysql at the command prompt to enter the MySQL Shell.

Now run this command in the MySQL Shell to see the MySQL version.

show variables like ‘%version%’;

MySQL will return the version result after executing the command.

Understanding The MySQL Naming Scheme

Always make sure to run the latest MySQL version on your server.

Install only the latest MySQL General Availability (GA) release. The GA releases are MySQL stable versions and are safe and reliably for production uses. Although developmental releases have the newest features, they are not suitable for production uses.

MySQL 8.0 is the latest MySQL version. 

The naming scheme uses release names that consist of three numbers and an optional suffix, for example, mysql-8.0.1-dmr.

Understanding the naming scheme will enable you to know the correct version to install. Here’s how to interpret a MySQL version number.

  • The first number shows the major version number. In the above case, it’s eight.
  • The second number shows the minor version number. In the example above, it’s zero. The major and minor version numbers constitute the release series number, and it describes the stable feature.
  • The third number shows the number for each bug-fix release. The version with the latest bug-fix makes the best choice, of course, in most cases.
  • The suffix indicates the stability level of each release. Two possible suffixes are dmr and rc. The former stands for Development Milestone Releases, while the latter stands for Release Candidate.

New features with dmr releases are not thoroughly certified for production uses. 

Release Candidate is the second development stage in the series.

Although the vendors believe the RC series is relatively stable, their efforts shift to fixing bugs to stabilize the features. They might also introduce new features at this stage.

MySQL versions without any suffix are pretty stable, free of bugs and suitable for production uses. They have attained the GA status.

Wrapping It Up

Running the latest stable version of MySQL enables you to enjoy the newest features and have software free of bugs. You can always check your MySQL by following the steps we outlined above. You can always contact Support whenever you need help.



Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.

Write a Comment