本文介绍了Node.js MSSQL tedius ConnectionError:无法连接到本地主机:1433-连接ECONNREFUSED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 mssql 连接界面使用NodeJS连接到MSSQL 2012.

I am trying to connect to MSSQL 2012 using NodeJS with the mssql connection interface.

尝试连接时出现以下错误:

When attempting to connect I get the following error:

{ [ConnectionError: Failed to connect to localhost:1433 - connect ECONNREFUSED]
  name: 'ConnectionError',
  message: 'Failed to conncet to localhost:1433 - connect ECONNREFUSED',
  code: 'ESOCKET' }

关于如何解决此问题的任何想法?

Any ideas on how to fix this?

推荐答案

解决方案是启用默认情况下禁用的TCP连接.

The solution is to enable TCP connections which are disabled by default.

这篇关于Node.js MSSQL tedius ConnectionError:无法连接到本地主机:1433-连接ECONNREFUSED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 15:40