0

I'm having a project which I need the server to have db. I chose Sql Server 2012 (because I used it). Now the sql configured with a Windows authentication and I unable to connect it (maybe it's because the config string is not good).

Should I use windows authentication or sql connection? I use require ('mssql') and my config is like this:

var config = {
  user: 'MyName',
  password: '123',
  server: 'localhost',
  database: 'MyProj',
  options: {
    instanceName: 'SQLEXPRESS'
  }
};

error message:

{ [ConnectionError: Failed to get response from SQL Server Browser on localhost] name: 'ConnectionError', message: 'Failed to get response from SQL Server Browser on localhost', code: 'EINSTLOOKUP' }

What did I do wrong? (I know something wrong because it doesn't working)

5
  • 1
    What error do you get? Commented Sep 22, 2014 at 21:42
  • { [ConnectionError: Failed to get response from SQL Server Browser on localhost] name: 'ConnectionError', message: 'Failed to get response from SQL Server Browser on localhost', code: 'EINSTLOOKUP' } Commented Sep 22, 2014 at 22:17
  • Are you running SQL Server on the standard port, 1433? Commented Sep 22, 2014 at 22:49
  • Yes I am (I didn't change any parameter in configuration) Commented Sep 23, 2014 at 9:44
  • My problem was I needed to add users and I tried to use one created when I install the db, a big mistake of mine. Thank you Commented Oct 1, 2014 at 12:15

1 Answer 1

1

I normally always make sure all my MS SQL Servers are setup in Mixed Mode. Then you can use the actual username and password in your connection string

Sign up to request clarification or add additional context in comments.

2 Comments

Agreed. I don't know the mssql module but I would guess it's not doing ntlm/integrated auth.
I configured MSSQL when installed it as a mixed and inserted my password (and confirmation) but now I can connect sql management only using windows authentication, SQL authentication doesn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.