XiaoMi / soar

SQL Optimizer And Rewriter
Apache License 2.0
8.67k stars 1.32k forks source link

soar 数据库连接测试时如果账号密码错误会一直挂着 #196

Closed Becivells closed 5 years ago

Becivells commented 5 years ago

日志如下 soar -online-dsn "homestead:secret@192.168.10.10/nwks" -test-dsn "homestead:secret@192.168.10.101" -check-config [mysql] 2019/02/14 13:04:09 driver.go:81: net.Error from Dial()': dial tcp 192.168.10.101:3306: connect: operation timed out [mysql] 2019/02/14 13:05:24 driver.go:81: net.Error from Dial()': dial tcp 192.168.10.101:3306: connect: operation timed out

martianzhang commented 5 years ago

默认连接超时为 0s 即不超时,导致一直等待。在配置文件中添加超时配置可避免该问题。

soar 在后续版本中将修复。

martianzhang commented 5 years ago

cc59f44e3900cb8b57b4dc904fe0bb0269b931bf fix this issue