go
network_error
ai_generated
true
错误:拨号 tcp 127.0.0.1:3306:连接被拒绝
error: dial tcp 127.0.0.1:3306: connect: connection refused
ID: go/database-sql-connection-refused
80%修复率
89%置信度
0证据数
2024-07-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.20 | active | — | — | — |
根因分析
数据库服务器未运行或在指定地址和端口上不可达。
English
The database server is not running or is unreachable at the specified address and port.
解决方案
-
95% 成功率
Ensure the database server is running and accessible from the application's network.
-
85% 成功率
Use a connection retry mechanism with backoff.
无效尝试
常见但无效的做法:
-
90% 失败
If the server is down, retrying without fixing the server will not help.
-
70% 失败
The driver is not the issue; the server is unreachable.