go
network_error
ai_generated
true
error: dial tcp 127.0.0.1:3306: connect: connection refused
ID: go/database-sql-connection-refused
80%Fix Rate
89%Confidence
0Evidence
2024-07-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.20 | active | — | — | — |
Root Cause
The database server is not running or is unreachable at the specified address and port.
generic中文
数据库服务器未运行或在指定地址和端口上不可达。
Workarounds
-
95% success
Ensure the database server is running and accessible from the application's network.
-
85% success
Use a connection retry mechanism with backoff.
Dead Ends
Common approaches that don't work:
-
90% fail
If the server is down, retrying without fixing the server will not help.
-
70% fail
The driver is not the issue; the server is unreachable.