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 line methods
mysql --version — client version
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
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
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:
SHOW VARIABLES LIKE 'version%' gives you the full breakdown — build platform, OS, edition.
GUI methods
MySQL Workbench
- Open MySQL Workbench
- Connect to your local instance
- Menu Server → Server Status
- 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:
| Component | Meaning | Example |
|---|---|---|
8 | Major version | Breaking changes (5.7 → 8.0 was a major rewrite) |
0 | Minor version | New features, backward compatible |
33 | Patch | Bug 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-MariaDBfor 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
| Goal | Command |
|---|---|
| Client version | mysql --version |
| Server binary version | mysqld --version |
| Server + uptime | mysqladmin -u root -p version |
| From SQL | SELECT VERSION(); |
| Full breakdown | SHOW VARIABLES LIKE 'version%'; |
| GUI | MySQL Workbench → Server → Server Status |
| PHP | $mysqli->server_info |
| Detect MariaDB vs MySQL | SELECT @@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.