docs: add system dependencies and update GaussDB driver info
- Add platform-specific system dependencies (unixODBC, Tauri libs) to README and getting-started docs - Update GaussDB driver from odbc-api to rust-gaussdb in database docs - Remove obsolete GaussDB ODBC setup instructions - Fix Docker image and port in getting-started docs
This commit is contained in:
@@ -164,6 +164,24 @@ Open `http://localhost:4224` in your browser. Multi-arch images (amd64 / arm64)
|
||||
- [pnpm](https://pnpm.io/)
|
||||
- [Rust](https://www.rust-lang.org/tools/install) >= 1.77
|
||||
|
||||
#### System Dependencies
|
||||
|
||||
**macOS:**
|
||||
|
||||
```bash
|
||||
brew install unixodbc
|
||||
```
|
||||
|
||||
**Linux (Ubuntu/Debian):**
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unixodbc-dev
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
|
||||
No additional dependencies required (ODBC is built into Windows).
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
|
||||
@@ -164,6 +164,24 @@ volumes:
|
||||
- [pnpm](https://pnpm.io/)
|
||||
- [Rust](https://www.rust-lang.org/tools/install) >= 1.77
|
||||
|
||||
#### 系统依赖
|
||||
|
||||
**macOS:**
|
||||
|
||||
```bash
|
||||
brew install unixodbc
|
||||
```
|
||||
|
||||
**Linux (Ubuntu/Debian):**
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unixodbc-dev
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
|
||||
无需额外安装(ODBC 已内置于 Windows)。
|
||||
|
||||
### 开发
|
||||
|
||||
```bash
|
||||
|
||||
@@ -20,7 +20,7 @@ DBX 通过 Rust 原生驱动支持 25+ 种数据库。
|
||||
| Oracle | oracle-rs | OCI |
|
||||
| Elasticsearch | HTTP client | REST |
|
||||
| DM(达梦) | odbc-api | ODBC |
|
||||
| GaussDB | odbc-api | ODBC |
|
||||
| GaussDB | rust-gaussdb | GaussDB |
|
||||
|
||||
## MySQL 兼容
|
||||
|
||||
@@ -43,7 +43,7 @@ DBX 通过 Rust 原生驱动支持 25+ 种数据库。
|
||||
|
||||
| 数据库 | 默认端口 | 备注 |
|
||||
|---|---|---|
|
||||
| openGauss | 5432 | SHA256 认证失败时可选 GaussDB(ODBC)连接 |
|
||||
| openGauss | 5432 | |
|
||||
| KingBase(人大金仓) | 54321 | |
|
||||
| Vastbase | 5432 | |
|
||||
| Redshift | 5439 | |
|
||||
@@ -51,7 +51,7 @@ DBX 通过 Rust 原生驱动支持 25+ 种数据库。
|
||||
|
||||
## ODBC 数据库
|
||||
|
||||
DM(达梦)和 GaussDB 通过 ODBC 连接,需要在系统上安装对应的 ODBC 驱动。
|
||||
DM(达梦)通过 ODBC 连接,需要在系统上安装对应的 ODBC 驱动。
|
||||
|
||||
### DM(达梦)
|
||||
|
||||
@@ -81,45 +81,3 @@ EOF
|
||||
**macOS 配置:**
|
||||
|
||||
达梦暂未提供 macOS 原生 ODBC 驱动。开发/测试建议使用 Linux 环境连接。
|
||||
|
||||
### GaussDB / openGauss
|
||||
|
||||
GaussDB 通过 ODBC 连接,用于绕过其自有的 SHA256 SASL 认证(标准 PostgreSQL 驱动不支持)。默认端口:**5432**,默认用户:**gaussdb**。
|
||||
|
||||
> **提示:** 如果你的 openGauss 实例使用 MD5 认证,可以直接选择 PostgreSQL(openGauss)驱动连接,无需 ODBC。
|
||||
|
||||
**Linux 配置:**
|
||||
|
||||
```bash
|
||||
# 安装 unixODBC
|
||||
sudo apt install unixodbc
|
||||
|
||||
# 从华为云下载 GaussDB ODBC 驱动
|
||||
# https://support.huaweicloud.com/mgtg-dws/dws_01_0032.html
|
||||
|
||||
# 在 /etc/odbcinst.ini 中注册驱动
|
||||
sudo tee -a /etc/odbcinst.ini << 'EOF'
|
||||
[GaussDBA]
|
||||
Description = GaussDB ODBC Driver
|
||||
Driver = /usr/lib/odbc/lib/psqlodbcw.so
|
||||
EOF
|
||||
```
|
||||
|
||||
**macOS 配置(使用 psqlODBC 替代):**
|
||||
|
||||
```bash
|
||||
# 安装 unixODBC 和 psqlODBC
|
||||
brew install unixodbc psqlodbc
|
||||
|
||||
# 在 odbcinst.ini 中注册为 GaussDBA
|
||||
DRIVER_PATH=$(find /opt/homebrew/Cellar/psqlodbc -name "psqlodbcw.so" | head -1)
|
||||
sudo tee -a /opt/homebrew/etc/odbcinst.ini << EOF
|
||||
[GaussDBA]
|
||||
Description = GaussDB ODBC Driver (via psqlODBC)
|
||||
Driver = $DRIVER_PATH
|
||||
EOF
|
||||
```
|
||||
|
||||
**Windows 配置:**
|
||||
|
||||
从[华为云](https://support.huaweicloud.com/mgtg-dws/dws_01_0032.html)下载并安装 GaussDB ODBC 驱动,安装程序会自动注册。
|
||||
|
||||
@@ -22,7 +22,7 @@ DBX supports 25+ database engines through native Rust drivers.
|
||||
| Oracle | oracle-rs | OCI |
|
||||
| Elasticsearch | HTTP client | REST |
|
||||
| DM (Dameng) | odbc-api | ODBC |
|
||||
| GaussDB | odbc-api | ODBC |
|
||||
| GaussDB | rust-gaussdb | GaussDB |
|
||||
|
||||
## MySQL Compatible
|
||||
|
||||
@@ -45,7 +45,7 @@ These databases use PostgreSQL protocol and work with the PostgreSQL driver:
|
||||
|
||||
| Database | Default Port | Notes |
|
||||
|---|---|---|
|
||||
| openGauss | 5432 | Use GaussDB (ODBC) if SHA256 auth fails |
|
||||
| openGauss | 5432 | |
|
||||
| KingBase | 54321 | |
|
||||
| Vastbase | 5432 | |
|
||||
| Redshift | 5439 | |
|
||||
@@ -53,7 +53,7 @@ These databases use PostgreSQL protocol and work with the PostgreSQL driver:
|
||||
|
||||
## ODBC Databases
|
||||
|
||||
DM (Dameng) and GaussDB connect through ODBC, which requires an ODBC driver installed on your system.
|
||||
DM (Dameng) connects through ODBC, which requires an ODBC driver installed on your system.
|
||||
|
||||
### DM (Dameng)
|
||||
|
||||
@@ -83,45 +83,3 @@ The DM8 installer automatically registers the ODBC driver. No manual configurati
|
||||
**macOS setup:**
|
||||
|
||||
DM does not provide a native macOS ODBC driver. For development/testing, DM is best accessed from Linux.
|
||||
|
||||
### GaussDB / openGauss
|
||||
|
||||
GaussDB connects via ODBC to bypass its custom SHA256 SASL authentication (which standard PostgreSQL drivers don't support). Default port: **5432**, default user: **gaussdb**.
|
||||
|
||||
> **Tip:** If your openGauss instance uses MD5 authentication, you can connect directly using the PostgreSQL (openGauss) driver without ODBC.
|
||||
|
||||
**Linux setup:**
|
||||
|
||||
```bash
|
||||
# Install unixODBC
|
||||
sudo apt install unixodbc
|
||||
|
||||
# Download GaussDB ODBC driver from Huawei Cloud
|
||||
# https://support.huaweicloud.com/mgtg-dws/dws_01_0032.html
|
||||
|
||||
# Register the driver in /etc/odbcinst.ini
|
||||
sudo tee -a /etc/odbcinst.ini << 'EOF'
|
||||
[GaussDBA]
|
||||
Description = GaussDB ODBC Driver
|
||||
Driver = /usr/lib/odbc/lib/psqlodbcw.so
|
||||
EOF
|
||||
```
|
||||
|
||||
**macOS setup (using psqlODBC as a workaround):**
|
||||
|
||||
```bash
|
||||
# Install unixODBC and psqlODBC
|
||||
brew install unixodbc psqlodbc
|
||||
|
||||
# Register as GaussDBA in odbcinst.ini
|
||||
DRIVER_PATH=$(find /opt/homebrew/Cellar/psqlodbc -name "psqlodbcw.so" | head -1)
|
||||
sudo tee -a /opt/homebrew/etc/odbcinst.ini << EOF
|
||||
[GaussDBA]
|
||||
Description = GaussDB ODBC Driver (via psqlODBC)
|
||||
Driver = $DRIVER_PATH
|
||||
EOF
|
||||
```
|
||||
|
||||
**Windows setup:**
|
||||
|
||||
Download and install the GaussDB ODBC driver from [Huawei Cloud](https://support.huaweicloud.com/mgtg-dws/dws_01_0032.html). The installer registers the driver automatically.
|
||||
|
||||
@@ -35,13 +35,10 @@ scoop update dbx
|
||||
你也可以通过 Docker 部署 DBX,适合团队共享和服务器环境:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name dbx \
|
||||
-p 3000:3000 \
|
||||
ghcr.io/t8y2/dbx:latest
|
||||
docker run -d --name dbx -p 4224:4224 -v dbx-data:/app/data t8y2/dbx
|
||||
```
|
||||
|
||||
部署后通过浏览器访问 `http://localhost:3000` 即可使用。
|
||||
部署后通过浏览器访问 `http://localhost:4224` 即可使用。
|
||||
|
||||
## 创建第一个连接
|
||||
|
||||
@@ -59,6 +56,24 @@ docker run -d \
|
||||
- [pnpm](https://pnpm.io/)
|
||||
- [Rust](https://www.rust-lang.org/tools/install) >= 1.77
|
||||
|
||||
#### 系统依赖
|
||||
|
||||
**macOS:**
|
||||
|
||||
```bash
|
||||
brew install unixodbc
|
||||
```
|
||||
|
||||
**Linux (Ubuntu/Debian):**
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unixodbc-dev
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
|
||||
无需额外安装(ODBC 已内置于 Windows)。
|
||||
|
||||
### 运行
|
||||
|
||||
```bash
|
||||
|
||||
@@ -37,21 +37,21 @@ scoop update dbx
|
||||
You can run DBX as a self-hosted web application using Docker:
|
||||
|
||||
```bash
|
||||
docker run -d --name dbx -p 3000:3000 ghcr.io/t8y2/dbx:latest
|
||||
docker run -d --name dbx -p 4224:4224 -v dbx-data:/app/data t8y2/dbx
|
||||
```
|
||||
|
||||
Then open `http://localhost:3000` in your browser.
|
||||
Then open `http://localhost:4224` in your browser.
|
||||
|
||||
For Docker Compose:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
dbx:
|
||||
image: ghcr.io/t8y2/dbx:latest
|
||||
image: t8y2/dbx
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "4224:4224"
|
||||
volumes:
|
||||
- dbx-data:/data
|
||||
- dbx-data:/app/data
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
@@ -74,6 +74,24 @@ volumes:
|
||||
- [pnpm](https://pnpm.io/)
|
||||
- [Rust](https://www.rust-lang.org/tools/install) >= 1.77
|
||||
|
||||
#### System Dependencies
|
||||
|
||||
**macOS:**
|
||||
|
||||
```bash
|
||||
brew install unixodbc
|
||||
```
|
||||
|
||||
**Linux (Ubuntu/Debian):**
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unixodbc-dev
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
|
||||
No additional dependencies required (ODBC is built into Windows).
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user