Determining the MySQL version

Learn how to determine which version of MySQL is installed on a server using cPanel, phpMyAdmin, or the command line.

This article describes how to determine which MySQL version is installed on a server.

Determining the MySQL version

There are several ways to determine the MySQL version installed on your server. Use whichever of the following methods you prefer.

Method #1: Use cPanel

To determine the MySQL version using cPanel, follow these steps:

  1. Log in to cPanel.

    📘

    Note

    If you do not know how to log in to your cPanel account, please see this article.

  2. In the right sidebar, under GENERAL INFORMATION, click Server Information:

  3. On the Server Information page, locate the MySQL Version row:
    cPanel - Server Information - MySQL version

Method #2: Use phpMyAdmin

To determine the MySQL version using phpMyAdmin, follow these steps:

  1. Log in to phpMyAdmin.

    👍

    Tip

    If you are using cPanel, you can log in to cPanel, and then in the DATABASES section of the cPanel home screen, click the phpMyAdmin icon:
    cPanel - phpMyAdmin icon

  2. The phpMyAdmin page appears. In the Database server section appears the MySQL version:
    phpMyAdmin - MySQL version information

Method #3: Use the command line

To determine the MySQL version from the command line, follow these steps:

  1. Log in to your account using SSH.

  2. At the command prompt, type the following command:

    mysql --version
    
  3. To view more detailed MySQL version information, log in to MySQL using the mysql program, and then type the following query:

    SHOW VARIABLES LIKE "%version%";
    

    This shows detailed version information for MySQL, the database engine, the SSL library, and more:

    MariaDB [(none)] SHOW VARIABLES LIKE "%version%";
    +-----------------------------------+------------------------------------------------------------+
    | Variable_name                     | Value                                                      |
    +-----------------------------------+------------------------------------------------------------+
    | in_predicate_conversion_threshold | 1000                                                       |
    | innodb_version                    | 10.3.23                                                    |
    | protocol_version                  | 10                                                         |
    | slave_type_conversions            |                                                            |
    | system_versioning_alter_history   | ERROR                                                      |
    | system_versioning_asof            | DEFAULT                                                    |
    | version                           | 10.3.23-MariaDB-cll-lve                                    |
    | version_comment                   | MariaDB Server                                             |
    | version_compile_machine           | x86_64                                                     |
    | version_compile_os                | Linux                                                      |
    | version_malloc_library            | jemalloc 3.6.0-0-g46c0af68bd248b04df75e4f92d5fb804c3d75340 |
    | version_source_revision           | 607467bd63db2c6ca64610eb9f4e703711f4dfc6                   |
    | version_ssl_library               | OpenSSL 1.0.2k-fips  26 Jan 2017                           |
    | wsrep_patch_version               | wsrep_25.24                                                |
    +-----------------------------------+------------------------------------------------------------+
    14 rows in set (0.002 sec)