MW

How-To · Database

How to Check MySQL Version on Windows (2026) — CLI, Workbench, SQL Query

Three ways to check what MySQL version you're running on Windows — `mysql --version` from CLI, `SELECT VERSION()` from inside a query, or the GUI in MySQL Workbench.

Jan 24, 2025 3 min read Windows beginner
Advertisement

Checking MySQL version is essential for compatibility checks, security patching, and matching documentation to your actual install. Three credible methods on Windows — CLI, SQL query, and GUI.

Command Prompt — quickest method
C:\> mysql --version
mysql Ver 8.0.33 for Win64 on x86_64 (MySQL Community Server - GPL)

Command line methods

mysql --version — client version

Command Prompt — client binary
C:\> mysql --version
mysql Ver 8.0.33 for Win64 on x86_64 (MySQL Community Server - GPL)

This shows the version of the client binary (mysql.exe). If you have multiple MySQL installs on the same machine, this tells you which one is on your PATH.

mysqld --version — server version

Command Prompt — server binary
C:\> mysqld --version
mysqld Ver 8.0.33 for Win64 on x86_64 (MySQL Community Server - GPL)

The server (mysqld.exe) version — important when the client and server are different versions (rare but possible if you’ve upgraded one and not the other).

mysqladmin version — admin tool

Command Prompt — admin tool with extra info
C:\> mysqladmin -u root -p version
Enter password: ******** Server version 8.0.33 Protocol version 10 Connection localhost via TCP/IP TCP port 3306 Uptime: 2 days 14 hours 32 min 18 sec Threads: 4 Questions: 1234 Slow queries: 0 Opens: 89

mysqladmin version requires an authenticated connection but returns more — uptime, threads, slow query counts.

From inside MySQL

If you’re already connected to a MySQL prompt, SELECT VERSION() is the canonical query:

MySQL prompt — version via SQL
C:\> mysql -u root -p
Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \\g. Server version: 8.0.33 MySQL Community Server - GPL
C:\> SELECT VERSION();
+-----------+ | VERSION() | +-----------+ | 8.0.33 | +-----------+ 1 row in set (0.00 sec)
C:\> SHOW VARIABLES LIKE 'version%';
+-------------------------+----------------------+ | Variable_name | Value | +-------------------------+----------------------+ | version | 8.0.33 | | version_comment | MySQL Community Server - GPL | | version_compile_machine | x86_64 | | version_compile_os | Win64 | +-------------------------+----------------------+

SHOW VARIABLES LIKE 'version%' gives you the full breakdown — build platform, OS, edition.

GUI methods

MySQL Workbench

  1. Open MySQL Workbench
  2. Connect to your local instance
  3. Menu Server → Server Status
  4. Version is the first field at the top of the panel (e.g. “Version: 8.0.33”)

MySQL Command Line Client

Find it in the Start menu: MySQL → MySQL X.X Command Line Client. The version is in the welcome banner that prints when you connect.

XAMPP / WAMP

If MySQL came with XAMPP or WAMP, the control panel shows the version. For XAMPP: launch XAMPP Control Panel → click Config next to MySQL → the version is in the dropdown.

Programmatic checks

Useful in scripts and apps that need version-aware behavior.

PHP

$mysqli = new mysqli('localhost', 'user', 'pass');
echo $mysqli->server_info;        // "8.0.33"
echo $mysqli->server_version;     // 80033 (numeric)

Python

import mysql.connector
conn = mysql.connector.connect(host='localhost', user='user', password='pass')
print(conn.get_server_info())     # '8.0.33'

Node.js

const mysql = require('mysql2/promise');
const conn = await mysql.createConnection({host: 'localhost', user: 'user', password: 'pass'});
const [rows] = await conn.query('SELECT VERSION()');
console.log(rows[0]['VERSION()']);  // '8.0.33'

Understanding version numbers

MySQL follows major.minor.patch — e.g. 8.0.33:

ComponentMeaningExample
8Major versionBreaking changes (5.7 → 8.0 was a major rewrite)
0Minor versionNew features, backward compatible
33PatchBug fixes, security only

Common version ranges you’ll encounter:

  • 5.6, 5.7 — older but still in many legacy WordPress hosts
  • 8.0 — current LTS, default for new installs
  • 8.1, 8.2 — innovation track (more frequent feature releases)
  • MariaDB 10.x — fork; reports as 5.5.5-10.x.x-MariaDB for compatibility reasons

Troubleshooting

mysql command not recognized

PATH isn’t picking up MySQL. See our PATH fix guide — same issue covered fully there.

Version differs between mysql --version and SELECT VERSION()

You have two MySQL installs on the machine — the CLI client connects to whichever it finds first on PATH, while SELECT VERSION() reports the running server. Run where mysql and where mysqld to find both binaries; align them.

Quick reference

GoalCommand
Client versionmysql --version
Server binary versionmysqld --version
Server + uptimemysqladmin -u root -p version
From SQLSELECT VERSION();
Full breakdownSHOW VARIABLES LIKE 'version%';
GUIMySQL Workbench → Server → Server Status
PHP$mysqli->server_info
Detect MariaDB vs MySQLSELECT @@version_comment;

Conclusion

Three ways to check MySQL version on Windows — pick whichever you’re already at:

  • At a Command Prompt: mysql --version
  • Already connected to MySQL: SELECT VERSION();
  • In MySQL Workbench: Server → Server Status

If you’re scripting against MySQL, use the driver’s server_info or get_server_info() method — they’re more robust than parsing the CLI output.

MySQL Windows Version Database Command Line
Advertisement

Get weekly notes in your inbox

Practical tips, tutorials and resources. No spam.