ELOGIN; MSSQL Login failed

Hi,

I am using NodeRed verion v3.0.2 and Node.js version v18.14.2.

I want to connect NodeRed with my MSSQL (2019) DB but get the "login failed for user" error everytime. I tried everything (other users/passwords/reinstall/update/...) but still no connection possible.
NodeRed and the SQL DB are running on the same server so I am using localhost.
Anybody got an idea??


Is the SQL server an instance or default install?

Is SQL server or node-red running in a container?

Have you tried the use encryption option?

The SQL server is a default install.
No containers.
Yes but no change.

Can you share the full error message (use the copy value button that appears under your mouse when you hover over the message in the debug window)

Can you try using an IP address rather than localhost?

Also can you look in the SQL logs - you should find amongst the startup information what port number the SQL server is using?

Lastly, can you check what protocols you have enabled?

{"code":"ELOGIN","message":"Login failed for user 'NodeRed'.","details":"Login failed for user 'NodeRed'.","name":"ConnectionError"}

Have tried the IP, still no change.
Even the error code is the same.. so there should be no problem with localhost or am I thinking wrong?

In the SQL logs i find port 1433...

Protocols for the SQL Server?
They are all enabled. (Shahred Memory, Named Pipes, TCP/IP)

Also i can find this in the logs:
Date 28/02/2023 12:59:16
Log SQL Server (Current - 28/02/2023 12:53:00)

Source Logon

Message
Login failed for user 'NodeRed'. Reason: An attempt to login using SQL authentication failed. Server is configured for Integrated authentication only. [CLIENT: ::1]

But the user "NodeRed" already got nearly all rights (incl. admin for SQL)

This is the issue.

OK now I think I got it... I had to make an additional change in the general server config... Earlier there was enough to change the properties for the additional user. Now I had to change the general server authentication...
Don't know if there would be an easier way but now it works. :+1:

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