4 Detailed Ways to Check The MySQL Version in Linux

Introduction

MySQL is a widely used open-source database management system that powers numerous websites and organizations. It was initially released in 1995, and since then, several versions have been developed.

Knowing the version of MySQL you are using is crucial for making necessary configuration changes and optimizing settings to ensure the optimal performance of your applications.

In this post, we will guide you on how to check the MySQL version in Linux, simplifying the process for you.

Prerequisites

- Servers running any Linux operating system

- Install and run the MySQL server

- The root password configured on your server

How to Check The MySQL Version in Linux?

1. Check MySQL Version in The Login Log

When you log in to your MySQL in Linux, the login log will display your MySQL version number, as shown in the figure below.

check the mysql version

2. Check MySQL Version Using STATUS

If you have logged in to MySQL, you can enter 'STATUS' in the command window to check your MySQL version number. This command will output more detailed MySQL database information, as shown in the picture below.

MySQL> STATUS
use status to check the mysql version

3. Get MySQL Version Using SELECT VERSION

If you are already connected to your MySQL server, you can also use the SELECT VERSION command to check the MySQL version.

MySQL> SELECT VERSION();
use select version to get the mysql version

4. Find The MySQL Version via Command Line

The easiest way to check the version of MySQL on your system is from the command line. If you have root access to a Linux server, you can check the MySQL version with the following command:

MySQL> mysql -V
check the mysql version via command line

You will get the following output:

mysql  Ver 8.0.34-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

MySQL also provides the MySQLAdmin command-line utility to perform several administrative tasks. You can also check the MySQL version with this utility:

mysqladmin -V
check the mysql version via command line

You will get the following output:

mysqladmin  Ver 8.0.34-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Conclusion

We have provided you with multiple methods to determine the MySQL version in your Linux system. Now you can conveniently choose the method that suits your preference to check the MySQL version. Additionally, if you're looking for VPS hosting that supports MySQL, we recommend trying out Database Mart for a reliable and efficient hosting solution.