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:

  1. 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.

  2. 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.

  3. Run vc_redist.x64.exe and complete the installation.
  4. Extract the downloaded MySQL ZIP archive to a permanent folder.

    The extracted bin directory contains the mysql client and other utilities.

  5. Open the extracted bin folder in File Explorer.
  6. Copy the full folder path of the extracted bin directory.
  7. Add the copied bin path to the user Path environment variable.

    User Path changes avoid admin permissions; system Path changes apply to all users.

  8. 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)
  9. 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.

  10. Run a simple query to confirm the session works.
    mysql> SELECT 1;
    +---+
    | 1 |
    +---+
    | 1 |
    +---+
    1 row in set (0.00 sec)
  11. Exit the mysql client.
    mysql> exit
    Bye
Discuss the article:

Comment anonymously. Login not required.