Check the MySQL Version on Windows

December 11, 2023

Introduction

Checking the MySQL version is crucial to ensure you have access to the latest bug fixes, security patches, and performance improvements. This practice maintains compatibility, enhances security, and optimizes the database system performance.

The following text will show you how to check the MySQL version on Windows.

Check MySQL Version on Windows

Requirements

Check MySQL Version by Finding the MySQL Installation Path

On Linux, it's easy to find the MySQL version by running the mysqld --version. However, checking the MySQL version on Windows is a bit different.

For instance, run:

mysqld --version
mysqld command not working terminal output

The command produces an error message. Mysqld is always in the executable path in Linux. On Windows, however, it is in the MySQL installation directory, which is not always included in the PATH environment variable. This makes checking the MySQL version in Windows a bit more complex.

You need to locate the MySQL installation path to check the MySQL version on Windows. Follow these steps:

1. Navigate to the C:\Program Files\MySQL folder.

MySQL folder

2. Open the MySQL Server folder.

MySQL server folder

3. Access the bin folder.

bin folder

3. Copy the whole path, including the bin folder. In this case, the path is C:\Program Files\MySQL\MySQL Server 8.0\bin.

path to bin

4. Next, open the command prompt and run cd with the copied path:

cd C:\Program Files\MySQL\MySQL Server 8.0\bin
cd C:\Program Files\MySQL\MySQL Server 8.0\bin terminal output

6. Execute the mysqld --version command:

mysqld --version
mysqld --version terminal output

The output shows the current MySQL version.

Check MySQL Version in Windows via the Command Line Client

An easier way to check the MySQL version is via the Command Line Client. The Command Line Client comes with the MySQL installation. Take the following steps to check the MySQL version via the Command Line client:

1. Open MySQL Command Line Client.

open MySQL Command Line Client

2. Enter the root password.

Enter password in MySQL Command Line Client

2. Next, check the MySQL version with:

SELECT VERSION ();
terminal output for SELECT VERSION ();

The output shows the version is 8.0.35.

Check MySQL Version in Windows via CLI

An alternative way to check the MySQL version is via Windows CLI. To do that, follow these steps:

1. Access the command prompt.

2. Use cd to navigate to the MySQL installation directory's bin folder. In our case, it is C:\Program Files\MySQL\MySQL Server 8.0\bin, but it depends on the system:

cd C:\Program Files\MySQL\MySQL Server 8.0\bin
cd C:\Program Files\MySQL\MySQL Server 8.0\bin terminal output

3. Connect to the MySQL server as the root user with a password prompt:

mysql -u root -p
Terminal output for mysql -u root -p

4. Enter the root password

5. Execute this command to the version:

SHOW VARIABLES LIKE 'version';
SHOW VARIABLES LIKE 'version'; terminal output

Check MySQL Version Via MySQL Workbench

MySQL Workbench lets you obtain comprehensive information about the installed MySQL server, including the version number. To find the MySQL version number via MySQL Workbench, follow these steps:

1. Launch MySQL Workbench.

Launch MySQL Workbench.

2. Establish a connection to the MySQL server.

MySQL Workbench connect to server

3. Navigate to Server Status under Management in the left-side panel.

MySQL Workbench Server Status

4. The primary work area contains details such as the installed MySQL server version and other relevant information.

MySQL Workbench Server Status version

Check MySQL Version Via the mysqladmin Tool

The mysqladmin tool is a command-line utility tool for server administration tasks. It allows users to perform various administrative operations, including checking the MySQL version.

To check the MySQL version, follow these steps:

1. Open Command Prompt.

2. Navigate to the MySQL server bin directory. In our case:

cd C:\Program Files\MySQL\MySQL Server 8.0\bin
terminal output for cd C:\Program Files\MySQL\MySQL Server 8.0\bin

3. Type in the following syntax using your password:

mysqladmin version –user=root –password=[password]

Replace [password] with your password without using the parenthesis:

mysqladmin version –user=root –password=[password] terminal output

The output shows the server status and version.

Conclusion

After reading this article, you now know how to use five different ways to check the MySQL version in Windows.

Next, learn how to create a table in MySQL.

Was this article helpful?
YesNo
Sara Zivanov
Sara Zivanov is a technical writer at phoenixNAP who is passionate about making high-tech concepts accessible to everyone. Her experience as a content writer and her background in Engineering and Project Management allows her to streamline complex processes and make them user-friendly through her content.
Next you should read
PostgreSQL Vs MySQL: A Detailed Comparison
March 30, 2023

Explore the differences between the two most widely used database management systems. PostgreSQL and MySQL are both...
Read more
How to Start, Stop, and Restart MySQL Server
March 23, 2023

With MySQL, users can store and manage data in a customized, structured format. This tutorial explains how to start, stop, or restart the MySQL...
Read more
How to Uninstall MySQL in Linux, Windows, and macOS
March 3, 2023

Uninstalling MySQL can sometimes be the solution for dealing with bugs, or when you need to shift back to an older version. This...
Read more
How To Show a List of All Databases in MySQL
October 13, 2022

With Structured Query Language (SQL), you can easily access and manage content in all your databases. This guide will show you how to list all...
Read more