Node.js MSSQL tedius ConnectionError: Failed to connect to localhost:1433 - connect ECONNREFUSED

前端 未结 10 1610
情话喂你
情话喂你 2020-12-09 01:37

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

When attempting to connect I get the following error:

{ [Conn         


        
10条回答
  •  無奈伤痛
    2020-12-09 02:08

    If after enabling the TCP connection and still your configuration is not working. Here's my own-configuration.

    var config = {
        "user": 'admin',
        "password": 'password',
        "server": 'ALBERT-PC',
        "database": 'database_name',
        "port": '61427',
        "dialect": "mssql",
        "dialectOptions": {
            "instanceName": "SQLEXPRESS"
        }
    };
    

提交回复
热议问题