# sql：未知的驱动程序"mysql"（忘记导入？）

- **ID:** `go/database-sql-unsupported-driver`
- **领域:** go
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

未导入数据库驱动程序，或驱动程序名称拼写错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.17 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   import _ "github.com/go-sql-driver/mysql"
   ```
2. **** (90% 成功率)
   ```
   sql.Open("mysql", "user:password@tcp(host:port)/dbname")
   ```

## 无效尝试

- **** — Driver names are case-sensitive; 'MySQL' is not the same as 'mysql'. (80% 失败率)
- **** — Go requires a blank import to register the driver. (70% 失败率)
