尝试使用 SQLTools 运行脚本时出错

Getting error trying to run script with SQLTools

提问人:Hauscrafter1978 提问时间:1/26/2023 更新时间:11/8/2023 访问量:446

问:

我尝试使用 VSCorde 的 SqlTools 扩展,并想用它运行脚本并给我这个错误(我正在使用 github 代码空间)

[1674681282366] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1674681282367] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1674681282368] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1674681282369] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1674681284190] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1674681284191] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1674681284191] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1674681284192] INFO  (ls): Connection instance created for panel.
    ns: "conn-manager"
[1674681284193] ERROR (ls): {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}},"name":"Error"}
    ns: "conn"
[1674681284193] ERROR (ls): Connecting error: {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}},"name":"Error"}
    ns: "conn-manager"
[1674681284193] ERROR (ls): Open connection error
    ns: "conn-manager"
[1674681284194] ERROR (ext): ERROR: Error fetching records. connect ECONNREFUSED 127.0.0.1:3306, {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}}}
    ns: "error-handler"```
SQL工具

评论


答:

0赞 Devart 5/10/2023 #1

最有可能的是,该错误是因为该工具无法连接到MySQL服务器。ECONNREFUSED 错误消息指出服务器拒绝了连接请求。

原因可能是服务器设置不正确、登录详细信息不正确或配置错误。

请检查以下选项:

  • 确保 MySQL 服务器处于活动状态,并且 IP 地址 127.0.0.1:3306 可用。
  • 确保您连接到MySQL服务器的登录详细信息正确无误。
  • 检查MySQL服务器设置,并确保它允许外部连接。
  • 检查 SqlTools 扩展配置,并确保已指定正确的 MySQL 服务器地址、提供正确的登录详细信息并正确设置其他设置。