name: 'ConnectionError',
message: 'Failed to
conncet to localhost
Below are the steps I have followed to resolve this. Step 1 Ensure that the TCP/IP protocol is Enabled as shown below
Step 2
Ensure that the sql server browser is running as shown
below.
Step 3
Node.js connections only
supports authenticating with SQL Server accounts.
This is not that clear in the documentation. It took me a while to figure this.
To ensure that the SQL
SERVER is configured for sql server authentication do the following
·
In SQL Server Management Studio Object Explorer, right-click the
server, and then click Properties.
· On the Security page, under Server authentication, select the
new server authentication mode, and then click OK.
You might be prompted to restart the sql server. Right click the sql server and restart. The SQL Server Agent should also be restarted.