Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> MySQL

MySQL Command Line Client cho Windows?

Để cài đặt MySQL Command Line Client trên Windows:

  1. Truy cập trang tải chính thức: https://dev.mysql.com/downloads/mysql/
  2. Chọn hệ điều hành: Windows (x86, 32/64-bit)
  3. Tải file cài đặt MySQL Installer (phiên bản Web hoặc Full):
    • Web Installer (nhỏ, tải component khi cài) - khuyến nghị.
    • Full Installer (lớn, chứa sẵn tất cả).
  4. Chạy installer, chọn setup type:
    • Developer Default: Cài Server, Workbench, Shell, Router, Samples... (khuyến nghị cho dev).
    • Server Only: Chỉ cài MySQL Server.
    • Client Only: Chỉ công cụ client (mysql, mysqldump...).
  5. Hoàn tất cài đặt, cấu hình root password, port (mặc định 3306), Windows Service.

Sau cài đặt, mở Command Prompt (cmd) hoặc PowerShell, chạy:

mysql -u root -p

Nhập mật khẩu → vào được MySQL shell (mysql>).

Lưu ý: Thêm thư mục bin của MySQL vào PATH hệ thống để chạy mysql từ bất kỳ đâu.