Files
Nexus/docs/changelog/2026-06-06-1panel-mysql-1045-grant.md
T

28 lines
961 B
Markdown
Raw Normal View History

# 2026-06-06 — 1Panel MySQL 1045 授权修复
## 摘要
安装向导步骤 3 报 `Access denied for user 'nexus'@'172.18.x.x'`1Panel 常见仅 `nexus@localhost`Docker 网段连接被拒。新增 `fix-1panel-mysql-grant.sh` 与安装 API 明确错误提示。
## 动机
验收脚本已通过但 init-db 1045;需在仓库内提供可重复修复路径,避免手工 SQL 易错。
## 涉及文件
- `deploy/fix-1panel-mysql-grant.sh` — 创建/授权 `nexus@'%'`
- `server/api/install.py` — 1045 友好错误与 connection-check
- `deploy/README-1panel.md` — 1045 排障节
## 验证
```bash
MYSQL_ROOT_PASSWORD='...' NEXUS_DB_PASSWORD='...' bash deploy/fix-1panel-mysql-grant.sh
# 安装向导步骤 3 初始化成功
bash deploy/sync-install-wizard-to-container.sh # 同步 install.py 到运行中容器
```
## 迁移 / 重启
无 DB 迁移。`install.py` 变更需 `sync-install-wizard-to-container.sh``nx update --no-cache`