Files
Nexus/docs/changelog/2026-06-04-npm-proxy-mysql-mcp.md
T
Nexus Deploy 811eb97fbf chore: Ubuntu local dev scripts, deploy gate, and audit changelogs
Rename WSL helpers to Linux-native scripts, expose Redis in docker-compose,
prefer .venv tools in pre_deploy_check, and record 2026-06-04 audit waves.
2026-06-04 23:02:21 +08:00

39 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-06-04 — npm/npx SOCKS5 代理与 MySQL MCP 启动
## 摘要
`scripts/linux_mcp_mysql.sh` 增加 SOCKS5 代理支持:自动 source `scripts/npm-proxy.env`、优先本地 `node_modules/.bin/mysql-mcp-server`、npx 回退时经 `proxychains4`
## 动机
`npx @yclenove/mysql-mcp-server` 访问 registry.npmjs.org 出现 `ECONNRESET`;用户代理为 SOCKS5 `192.168.124.93:10808`。npm 不能直接使用 `socks5://` 环境变量。
## 涉及文件
| 文件 | 变更 |
|------|------|
| `scripts/linux_mcp_mysql.sh` | source npm-proxy.env;本地 bin 优先;proxychains npx 回退 |
| `scripts/npm-proxy.env.example` | 新增 SOCKS5 模板 |
| `scripts/npm-proxy.env` | 本地配置(gitignore |
| `.gitignore` | 忽略 `scripts/npm-proxy.env` |
| `docs/project/mysql-mcp-setup.md` | §9 代理说明更新 |
## 用法
```bash
cp scripts/npm-proxy.env.example scripts/npm-proxy.env
# 可选:/etc/proxychains4.conf 添加 socks5 192.168.124.93 10808
npm install --no-save @yclenove/mysql-mcp-server@latest # 首次需代理时用 proxychains4 包一层
bash scripts/linux_mcp_mysql.sh # 应见 [MySQL MCP] Starting...
```
## 验证(本机 2026-06-04
```
node_modules/.bin/mysql-mcp-server ✅ [MySQL MCP] Starting...
linux_mcp_mysql.sh ✅ 同上(优先本地 bin)
npm ping via socks5 env ❌ FETCH_ERROR(预期;npm 不支持 socks5 URL
```
进度:`☑实现 ☑本地验证 □审计8步 □部署 □健康检查 □浏览器验证 ☑changelog`