Categories: TutorialsUbuntu

Ways to Check MySQL Version in Linux

Introduction

MySql is a relational database management system that permits users to organize data in the database. Knowing which MySQL version is running on your server may be useful in some cases due to certain differences between MySQL versions. If you’re installing an application that requires a specific MySQL version, for example, you’ll need to know what version of MySQL your MySQL server is before you start.

In this article, I will provide you with different ways to check the MySQL version in Linux.

How to check the MYSQL version

Using the command line, you can check the MYSQL version

Enter the following command into your terminal:

kusal@linuxways:~$

Sponsored
mysql -V

To ascertain the server version, run the binary with the –version or -V lines as shown below:

Note: Before quitting, the command above will indicate the version of MySQL installed.

To determine the installed MySQL version, use the following command with the mysqladmin program:

kusal@linuxways:~$ mysqladmin -V

Using the MYSQL shell, you can check the MYSQL version

The MySQL utility command client is used to find out what version of MySQL your operating system has installed. On the MySQL shell, use the following command to connect to the MySQL server.

kusal@linuxways:~$ sudo mysql

Once the server has been connected to the MySQL shell, the MySQL version will be displayed on the screen, as shown in the image below:

The status command displays the current status of the server, as well as the MySQL version.

Sponsored

To use the status command, run the following command:

mysql>status

Use the query version variables as suggested to acquire more information about the MySQL installed version and all of its related components:

mysql> SHOW VARIABLES LIKE "%version%";

Using MySQL Workbench, you can check the version of MySQL.

Another way to check the version of MySQL installed on your machine is to use MySQL Workbench. Connect to the server using MySQL Workbench and then proceed as follows:

On the MySQL workbench main menu, select the server. Select “Server Status” from the drop-down menu. Both the server information and the MySQL version will be displayed in the server status.

Using PHP, you can check the version of MySQL

If you’re on a shared hosting account and don’t have access to a command line or a MySQL client like PhpMyAdmin, you can use PHP to find out what MySQL server version you’re running.

Conclusion

The article gives you an idea on what are the ways to check the MySQL version in Linux. Thank you for reading.

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Ubuntu Server Admin

Recent Posts

Ubuntu Weekly Newsletter Issue 873

Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…

6 hours ago

How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…

7 hours ago

Remembering and thanking Steve Langasek

The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…

11 hours ago

How to Change Your Prompt in Bash Shell in Ubuntu

I don’t like my prompt, i want to change it. it has my username and…

15 hours ago

The Silent Guardian: Why Bundler Checksums Are a Game-Changer for Your Applications

Introduction: A Fragile Trust The Ruby ecosystem relies heavily on RubyGems.org as the central platform…

2 days ago

How to Install Snipe-IT on Ubuntu 24.04

Asset management is the process of managing and maintaining a company’s assets to maximize their…

6 days ago