How to check MySQL version in Windows can be a bit of a task. This is so because there is a substantial difference between Linux and Windows installation of MySQL server. Moreover most of the MySQL tutorials and guides are focused on the Linux installation of MySQL version.
Check the MySQL daemon for version
The common Linux way of finding the MySQL version is by running the status command ‘mysqld –version’ in the shell prompt. But things are not so simple on Windows, where you need to check the MySQL version. In a Linux environment mysqld is always within the executable path. But in Windows mysqld is placed in the MySQL installation directory, which may not be present in the PATH environment variable. This makes checking the MySQL version in Windows a bit different.
To check the MySQL version installed in windows, you first need to find the MySQL installation path on Windows. The installation path is also dependent on the MySQL version in Windows. If the MySQL version in Windows is 8.0, then the installation path will be C:\Program Files\MySQL\MySQL Server 8.0. So for checking the MySQL version in Windows, you need to first look into the C:\Program Files\MySQL folder. Just by looking at the name of the folder inside it, you can guess the MySQL version in Windows.
Next, move to the MySQL installation folder as per MySQL version in Windows (e.g. C:\Program Files\MySQL\MySQL Server 8.0 in our case. Inside it, there is a bin directory. Copy the whole path including the bin directory. Now open a command prompt and change the directory to that path. Then run the command mysqld –version. This command will output the full version details of MySQL in Windows.
Microsoft Windows [Version 10.0.17763.3046]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 8.0\bin
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqld --version
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe Ver 8.0.30 for Win64 on x86_64 (MySQL Community Server - GPL)
C:\Program Files\MySQL\MySQL Server 8.0\bin>
Querying via MySQL command line client
To check the MySQL version installed in Windows, open the mysql command line client. You need to provide the root password in the password prompt. Then we get connected to the local MySQL server. Next, in the mysql prompt type in the query – ‘SELECT VERSION();’ it will display the MySQL server version in Windows.
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.30 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.30 |
+-----------+
1 row in set (0.00 sec)
mysql>
How to check MySQL version in windows via CLI
To check the MySQL server version installed in Windows, we need to open the mysql command line client. In this command line client window, you need to provide the root password in the password prompt. Once you get connected to the local MySQL server, in the mysql prompt type in the query – ‘SHOW VARIABLES LIKE “%version%”;’ This will show detailed information on the MySQL server version installed in Windows
mysql> SHOW VARIABLES LIKE "%version%";
+--------------------------+------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------+
| admin_tls_version | TLSv1.2,TLSv1.3 |
| immediate_server_version | 999999 |
| innodb_version | 8.0.30 |
| original_server_version | 999999 |
| protocol_version | 10 |
| replica_type_conversions | |
| slave_type_conversions | |
| tls_version | TLSv1.2,TLSv1.3 |
| version | 8.0.30 |
| version_comment | MySQL Community Server - GPL |
| version_compile_machine | x86_64 |
| version_compile_os | Win64 |
| version_compile_zlib | 1.2.12 |
+--------------------------+------------------------------+
13 rows in set (0.03 sec)
mysql>
Check the version Via MySQL Workbench
If MySQL Workbench is installed, which is commonly done during MySQL server installation, we can use the MySQL Workbench to get detailed information regarding the MySQL server installed. Once you start MySQL Workbench and connect the MySQL server, click on Server Status under Management on the left side panel. Inside the main work area the MySQL server version is installed and other details are displayed.
Check with the mysqladmin command line tool
Open a command prompt and change directory to MySQL server bin directory. In our case, it is C:\Program Files\MySQL\MySQL Server 8.0\bin. Next type in the command ‘mysqladmin version –user=root –password=<password>‘. This will show the installed version of MySQL server in Windows, along with some other information.
Microsoft Windows [Version 10.0.17763.3046]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 8.0\bin
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqladmin version --user=root --password=
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
mysqladmin Ver 8.0.30 for Win64 on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Server version 8.0.30
Protocol version 10
Connection Shared memory: MYSQL
TCP port 0
Uptime: 2 hours 58 min 10 sec
Threads: 2 Questions: 7123 Slow queries: 0 Opens: 339 Flush tables: 3 Open tables: 247 Queries per second avg: 0.666
C:\Program Files\MySQL\MySQL Server 8.0\bin>
Conclusion
We hope the above options help you in your query on how to know MySQL version number in windows. If you are looking for managed Windows VPS hosting or Dedicated windows server hosting in India with MySQL support on Windows, then check out our service offerings and get in touch with us.
Need MySQL Hosting on Windows Server?TIER IV Windows Hosting with Plesk and MySQL
|