Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»MySQL»How to Check MySQL Version

    How to Check MySQL Version

    RahulBy RahulDecember 14, 20202 Mins ReadUpdated:July 23, 2021

    MySQL is a relational database management system. At the writing time of this tutorial MySQL, 8 is the latest version available. This tutorial helps you to check the MySQL server version running on your system.

    • Install MySQL on Ubuntu 20.04
    • Install MySQL on Debian 10

    Find Version with mysqld Command

    Use mysqld command with -V option to check MySQL version running on local host system. The below examples can only used for the localhost only.

    mysqld -V 
    
    Output:
    /usr/sbin/mysqld Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

    The above result shows that you are running MySQL version 8.0.25 on your local system.

    Using SELECT VERSION Statement

    You can also obtain the version from within the MYSQL shell by typing the SELECT VERSION() statement:

    mysql> SELECT VERSION();
    
    Output:
    +-------------------------+ | VERSION() | +-------------------------+ | 8.0.25-0ubuntu0.20.04.1 | +-------------------------+ 1 row in set (0.00 sec)

    Using SHOW VARIABLES Statement

    You can also find the MySQL version information, which is stored in a variable named version. Type the below statement to view the MySQL server version.

    mysql> SHOW VARIABLES LIKE "%version%";
    

    MySQL check version

    Check MySQL Version During Connecton

    You can also check the MySQL version with a log-in to MySQL command-line interface. When we connect to the MySQL shell, it displays a welcome message including the MySQL version running on the system.

    This method can be used to check MySQL versions running on localhost as well as on the remote hosts.

    mysql -u root -p 
    

    How to Check MySQL Version

    Conclusion

    This tutorial helps you to check the MySQL version running on localhost or a remote host.

    MySQL version
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Search files with case-insensitive names in Linux
    Next Article mv command in Linux with Useful Example

    Related Posts

    How To Install Linux, Nginx, MySQL, & PHP (LEMP Stack) on Ubuntu 22.04

    Updated:April 7, 20227 Mins Read

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    How To Check OS Version with Linux Command Line

    3 Mins Read

    How to Check the PostgreSQL Version

    Updated:August 6, 20212 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.