Files
pos-system/infra/servers/psql.md
Ho Ngoc Hai 5c8764f63a docs(architecture): Update documentation for direct upload architecture and API endpoints
- Enhanced the architecture documentation to recommend direct upload over legacy proxy upload for improved performance and scalability.
- Added detailed comparisons of upload patterns, including throughput, memory usage, and latency.
- Updated API endpoint documentation to reflect new direct upload methods and their benefits.
- Included examples for direct upload flow and bucket directory structure to aid developers in implementation.
2026-01-13 21:17:55 +07:00

48 lines
1.1 KiB
Markdown

# Hướng dẫn sử dụng PostgreSQL
## Phiên bản
PostgreSQL 18.1
## Thông tin tài khoản
Dưới đây là thông tin tài khoản và mật khẩu đã được cấu hình:
| Tài khoản | Mật khẩu | Quyền hạn |
| :--- | :--- | :--- |
| `ubuntu` | `Velik@2026` | Superuser |
| `postgres` | `Velik@2026` | Superuser |
## Cách kết nối
### 1. Kết nối bằng tài khoản `ubuntu` (Mặc định)
Bạn đang đăng nhập vào server bằng user `ubuntu`, nên có thể kết nối trực tiếp:
```bash
psql
```
### 2. Kết nối bằng tài khoản `postgres`
Để kết nối với tư cách là user hệ thống `postgres`:
```bash
sudo -u postgres psql
```
Hoặc kết nối qua giao thức mạng (yêu cầu mật khẩu):
```bash
psql -U postgres -h localhost
```
### 3. Kết nối từ xa (Remote Access)
Server đã được cấu hình để cho phép kết nối từ xa từ bất kỳ IP nào.
- **Public IP**: `167.114.174.113`
- **Port**: `5432`
- **Lệnh kết nối**:
```bash
psql -h 167.114.174.113 -U postgres
```
> **Lưu ý**: Mật khẩu `Velik@2026` có chứa ký tự `@` là hoàn toàn hợp lệ.