This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 数据库导入说明(宝塔面板)
## 文件
| 文件 | 说明 |
|------|------|
| `chajia.sql` | 直接上传到宝塔「导入」 |
| `chajia.sql.gz` | 压缩版(若生成成功,二选一即可) |
## 宝塔导入步骤
1. 在宝塔 **MySQL** 中已创建数据库 **`chajia`**
2. 字符集选择 **`utf8mb4`**(与截图提示一致)
3. 进入该库 → **导入** → 上传 **`chajia.sql`**
4. 等待导入成功
## 包内内容
- 全部 **7 张业务表** + Prisma 迁移记录表
- 默认管理员:**`admin_demo` / `kj123456`**(上线后请立即修改)
- **不含**历史询价数据(本地库未连接,仅为空库结构 + 管理员)
若你需要把本机已有询价记录一并迁移,在能连上本机 MySQL 后执行:
```bash
bash deploy/database/export-local.sh
```
会生成带真实数据的 `chajia-full-日期.sql`。
## 导入后:应用连接配置
使用宝塔 MySQL 时,在服务器 `.env` 中设置(**不要用** `127.0.0.1:3307` 开发地址):