Cài đặt PostgreSQL

Hướng dẫn cài đặt PostgreSQL

15
  1. Tải PostgreSQL
  2. Cách cài đặt PostgreSQL
  3. Chú ý khi cài PostgreSQL
  4. Ví dụ tạo table PostgreSQL

Để cài PostgreSQL trên Windows

1. Tải PostgreSQL

Vào trang chính thức:

Vào link: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

PostgreSQL Downloads Chọn Download the installer → thường sẽ chuyển sang bộ cài của EDB: EDB Installer Download Tải bản mới nhất cho Windows.

2. Cách cài đặt PostgreSQL

Mở file .exe, bấm Next liên tục. Các bước quan trọng: Chọn thành phần Nên giữ mặc định: PostgreSQL Server pgAdmin (giao diện quản lý) Command Line Tools

Đặt mật khẩu
Sẽ có bước đặt password cho user mặc định

3. Chú ý khi cài PostgreSQL

Trong lúc cài PostgreSQL, nhớ tick:

✅ PostgreSQL Server
✅ pgAdmin 4
✅ Command Line Tools

Sau khi cài xong, mở pgAdmin bạn sẽ có giao diện kiểu:

Servers
Databases
Schemas
Tables

Có thể:

tạo database mới
tạo table bằng chuột
thêm cột
sửa kiểu dữ liệu
chạy SQL

4. Ví dụ tạo table PostgreSQL

Chuột phải Tables → Create → Table

Tìm kiếm:

Bài viết liên quan: