A local MySQL command-line client on Windows 11 enables quick SQL checks, scripted automation, and reliable remote administration when a GUI is unavailable or unnecessary.
On Windows, the classic mysql client (mysql.exe) is distributed with the MySQL Community Server binaries and is available as either an MSI installer or a ZIP Archive that can be unpacked without running a local database service.
MySQL for Windows is 64-bit only, and MySQL binaries depend on the Microsoft Visual C++ runtime, so a missing redistributable can prevent mysql.exe from launching. For newer MySQL releases, prefer product MSI/ZIP downloads rather than MySQL Installer, which is limited to the 5.7–8.0 series.
MySQL Installer only covers MySQL 5.7–8.0; MySQL 8.1+ uses product-specific MSI or ZIP downloads.
Steps to install MySQL client on Windows:
- Download the ZIP Archive of MySQL Community Server for Microsoft Windows.
https://dev.mysql.com/downloads/mysql/
Select ZIP Archive (not debug-test) to get mysql.exe and the standard client utilities.
- Download the latest supported Microsoft Visual C++ Redistributable for 64-bit Windows.
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
MySQL 8.4 on Windows requires the Visual C++ 2019 Redistributable; missing runtimes can prevent mysql.exe from launching.
- Run vc_redist.x64.exe and complete the installation.
- Extract the downloaded MySQL ZIP archive to a permanent folder.
The extracted bin directory contains the mysql client and other utilities.
- Open the extracted bin folder in File Explorer.
- Copy the full folder path of the extracted bin directory.
- Add the copied bin path to the user Path environment variable.
User Path changes avoid admin permissions; system Path changes apply to all users.
- Verify the mysql client is available in a new terminal session.
PS> mysql --version mysql Ver 8.4.7 for Win64 on x86_64 (MySQL Community Server - GPL)
- Connect to a remote MySQL server.
PS> mysql -h 192.168.1.15 -u db_admin -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.27 MySQL Community Server - GPL
Avoid passing passwords on the command line; use -p to prompt.
Add --ssl-mode=REQUIRED to refuse unencrypted connections when the server supports TLS.
- Run a simple query to confirm the session works.
mysql> SELECT 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec)
- Exit the mysql client.
mysql> exit Bye
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
