d0544c9bd2
Add fix-1panel-mysql-grant.sh and clearer install wizard errors when 1Panel MySQL only allows nexus@localhost. Co-authored-by: Cursor <cursoragent@cursor.com>
961 B
961 B
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-checkdeploy/README-1panel.md— 1045 排障节
验证
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。