Check MariaDB version Installed

Published: November 24, 2018 (Updated: Nov 24, 2018)

Enjoying this content? Subscribe to the Channel!

Essential MariaDB Tip: How to Quickly Check Your Server Version via Command Line

Hi there, this is Darren from Darren’s Tech Tutorials, and I’m glad you stopped by!

MariaDB is one of the most powerful and popular relational database management systems available today. As a community-developed, open-source fork of the original MySQL, MariaDB is robust, reliable, and entirely free under the GNU GPL.

Whether you’re debugging an issue, planning an upgrade, or simply ensuring compatibility with a new application, knowing exactly which version of MariaDB you are running is fundamental. This quick, practical tutorial will show you the fastest ways to check your server version directly from the command line.

Ready to dive in? Let’s get started!


Why Knowing Your MariaDB Version Matters

MariaDB is actively developed, meaning new versions regularly introduce performance improvements, security patches, and new features. Knowing your specific version (e.g., 10.5.x) helps you:

  • Confirm compatibility with frameworks or applications.
  • Identify required patches or security updates.
  • Troubleshoot system-specific bugs.

While we are demonstrating this process on a CentOS 7 machine, the command-line procedures are virtually identical across all common operating systems and Linux distributions.

Step 1: Logging into MariaDB Server

The very first step to checking your version is accessing the MariaDB command-line interface (CLI).

Open your terminal or command prompt and execute the following command. We will use the standard root user in this example:

mysql -u root -p

What this command means:

  • mysql: Initiates the connection to the MariaDB/MySQL client.
  • -u root: Specifies the user you are logging in as (in this case, the root administrative user).
  • -p: Prompts you to enter the password for the specified user (secure practice!).

Press ENTER. You will be prompted to enter your password. Once you successfully enter the credentials, you will be logged into the MariaDB environment.

Method 1: The Quick Check (Version on Login)

When you first successfully log into the MariaDB prompt, the system conveniently displays key information right there in the initial welcome message.

Look closely at the very first few lines after you log in. You will often see a banner similar to this (the version number will vary):

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 999
Server version: 5.5.60-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

The line Server version: immediately tells you the exact version you are running (in this example, 5.5.60-MariaDB). This is the fastest method, as no additional commands are needed!

Method 2: The Definitive Check (Using SELECT VERSION())

If for some reason the initial banner message is hidden or you want to retrieve the version information while already working within the database session, you can use a powerful SQL command: SELECT VERSION().

This command is the most reliable way to query the database server directly for its version information.

At the MariaDB prompt (MariaDB [(none)]>), type the following command exactly as shown, ensuring you include the open/close parentheses and the critical semicolon:

SELECT VERSION();

Press ENTER.

The output will clearly display the server version in a results table. For example:

VERSION()
5.5.60-MariaDB

Using the SELECT VERSION(); command is universally applicable and works on any active MariaDB session, giving you the definitive proof of your server’s software release.


Summary and Next Steps

Checking your MariaDB version is a quick task, but it’s an essential one for maintaining a healthy and secure database environment.

We’ve covered two easy methods:

  1. Checking the server banner immediately upon login.
  2. Executing the universal SELECT VERSION(); command within the MariaDB CLI.

We hope this quick tutorial helped you determine exactly what version of MariaDB you are running!

If you found this guide helpful, please do us a huge favor: Like this post and Subscribe to Darren’s Tech Tutorials for more clear, practical, and enthusiastic tech guides. If you have any questions or comments, drop them below—we love hearing from you!

Happy commanding!