# Node-red-contrib-mssql-plus 0.5.1 --\> Can't connect to MSSQL

**URL:** https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501
**Category:** General
**Created:** [6 September 2020 09:55 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501 "2020-09-06T09:55:46Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 09:55 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/1 "2020-09-06T09:55:46Z")

</div>

Hello guys!  
I tried to query simple data from local MS SQL but not success.

 ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77f7d95b675c9b3921412bae898f34d627cf7f29.png)

I also tried with another SQL Client software with same configuration, it worked well.

 ![SQL-Client-Configuration](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0eeb36d3842c8cc71224d63d9b3f28c258908c84.png)

I tried to reinstall it and run again, but it doesn't work. Can some body help me, please?

My nodes:  
`[{"id":"b1936c43.ce1ad","type":"tab","label":"Flow 7","disabled":false,"info":""},{"id":"1b87abb0.34259c","type":"inject","z":"b1936c43.ce1ad","name":"{\"count\": 5, \"age\": 35}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"{\"count\": 5, \"age\": 35}","payloadType":"json","x":300,"y":140,"wires":[["8ce9ae3.82a295"]]},{"id":"c6cb6799.2f54b","type":"debug","z":"b1936c43.ce1ad","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":260,"wires":[]},{"id":"8ce9ae3.82a295","type":"MSSQL","z":"b1936c43.ce1ad","mssqlCN":"66a6a2e2.728704","name":"","outField":"payload","returnType":0,"throwErrors":1,"query":"SELECT *\nFROM SQLDBLeaningPurpose.dbo.ParameterData WHERE ParameterName = 'G25_S1_acc_work'","modeOpt":"","modeOptType":"query","queryOpt":"","queryOptType":"editor","paramsOpt":"","paramsOptType":"none","params":[],"x":320,"y":200,"wires":[["c6cb6799.2f54b"]]},{"id":"66a6a2e2.728704","type":"MSSQL-CN","z":"","tdsVersion":"7_4","name":"My SQL Server","server":"localhost","port":"1433","encyption":false,"database":"SQLDBLeaningPurpose","useUTC":false,"connectTimeout":"2000","requestTimeout":"2000","cancelTimeout":"2000","pool":"5","parseJSON":false,"enableArithAbort":true}]`

Thanks, guys!

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 September 2020 12:39 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/2 "2020-09-06T12:39:19Z")

</div>

You entered localhost for the server. Is node-red backend and SQL server running on the same machine?

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 12:54 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/3 "2020-09-06T12:54:45Z")

</div>

Yes, node-red, SQL server and SQL Client software are running on the same machine. SQL Client software can connect to SQL server and query data properly, but node-red doesn’t.

---

<div class="post-metadata">

### Author: ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)
#### Post date: [6 September 2020 13:06 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/4 "2020-09-06T13:06:07Z")

</div>

So you are running Node-RED under windows? Did you try a simple password with no chance to misspell it?  
BTW I just saw in the flow, that there seems to be an error with the node: "encyption"!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 September 2020 13:06 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/5 "2020-09-06T13:06:33Z")

</div>

What operating system are you using and how did you install node-red?

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 13:26 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/6 "2020-09-06T13:26:23Z")

</div>

I am using Window10 64bit, I installed node-red via Command Prompt

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 September 2020 13:29 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/7 "2020-09-06T13:29:24Z")

</div>

> [@kabuto-gyu](#):
>
> I installed node-red via Command Prompt

There are many ways to do that. Do you mean the first method described in [Running on Windows : Node-RED](https://nodered.org/docs/getting-started/windows)

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 13:51 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/8 "2020-09-06T13:51:27Z")

</div>

Yes, I followed that link to installed via Command Prompt with the command `npm install -g --unsafe-perm node-red`  
I also tried to install Node-red-node-SQLite [https://flows.nodered.org/node/node-red-node-sqlite](https://flows.nodered.org/node/node-red-node-sqlite)  
But not success:

 ![node-red-node-sqlite](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/76b7c52ae52e3fe404c9bca5be08c4e5e75034ad.png)

Then I tried to reinstall **Node-red-contrib-mssql-plus 0.51** again, and observed some warning of deprecation ☹ :

 ![NodeRed-MSSQL-Plus-Reinstall](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3f375b9cc5fedbe315c20784c8d08ecba694142.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 September 2020 14:21 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/9 "2020-09-06T14:21:34Z")

</div>

The sqite error is, as it says in the log, that you need to install python.

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 14:22 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/10 "2020-09-06T14:22:46Z")

</div>

I changed password of user "sa" (default user of MS SQL) to "123456789password" and tried with this account. It worked 🥰

 ![NodeRed-SQL-Querry-ok](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/6/96e0351fc6c1c22aa3fd4cef15af37c60f84dcc9.png)

I tried again with my previous account, it still not work.  
Maybe there is some issue with my account & password (even though it worked well with MS SQL server Management Studio, and SQL Client software (SQLecton)).  
Thank you very much, guys! 🍻

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 September 2020 14:30 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/11 "2020-09-06T14:30:26Z")

</div>

If you could do some testing to find what the problem is (maybe particular chars in password or something) then I am sure the author of the node would like to know in order to fix it.

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [6 September 2020 14:41 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/12 "2020-09-06T14:41:02Z")

</div>

I tried:

1. change password of my previous account to: "123456789password" --\> it worked--\> no issue with my account's role or permission.
2. add "@" to my pass: "123456789password@" --\> it doesn't work any more --\> may be some issue if there is character "@" in password.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 September 2020 17:18 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/13 "2020-09-06T17:18:25Z")

</div>

Thanks for the info, I'll be sure to check the source and fix it if necessary.

Glad you have a working connection now @kabuto-gyu was worried for a minute I'd messed something up on the last release.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 September 2020 09:20 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/14 "2020-09-07T09:20:23Z")

</div>

Hi @kabuto-gyu I have tried setting a SQL 2017 "SQL account" password to `123456789password@` and everything worked correctly.

The only thing I can think is if your keyboard mapping was incorrect & the `@` was being entered in the password field as some other character?

If you wish to test this, type your password into a visible editor (notepad / vscode etc) copy the password and paste it into the field (to ensure the correct characters are entered)

Cheers, Steve.

---

<div class="post-metadata">

### Author: ![kabuto-gyu](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kabuto-gyu](https://discourse.nodered.org/u/kabuto-gyu)
#### Post date: [9 September 2020 03:16 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/15 "2020-09-09T03:16:37Z")

</div>

Dear Steve,

> [@Steve-Mcl](#):
>
> Hi @kabuto-gyu I have tried setting a SQL 2017 "SQL account" password to `123456789password@` and everything worked correctly.
> 
> The only thing I can think is if your keyboard mapping was incorrect & the `@` was being entered in the password field as some other character?
> 
> If you wish to test this, type your password into a visible editor (notepad / vscode etc) copy the password and paste it into the field (to ensure the correct characters are entered)
> 
> Cheers, Steve.

--\> I tested as you said, typed password (with special character "@") into notepad, copy & paste it into the field carefully, check if it same as original, then it worked.  
I tried to type password manually into the field of user (visible), the character, which is supposed to be "@", has become letter (" ), wrong keyboard mapping as you guessed 😱 . Maybe it happens because my keyboard is mapping to multiple languages.  
It will be great if you add a button to visible password for checking purpose.  
Thank you very much.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 September 2020 03:16 UTC](https://discourse.nodered.org/t/node-red-contrib-mssql-plus-0-5-1-cant-connect-to-mssql/32501/16 "2020-09-23T03:16:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
