1

I am working on an Azure Mobile Apps backend service, which I am trying to connect to a local SQL Server database, as described here. I have followed all the steps, except I am using SQL Server 2016 rather than 2014.

If I follow the Microsoft tutorial exactly, everything works fine. I am not sure what the environment variable is about, as I don't reference it anywhere, but anyway, when I run my app, I get the following output:

Express server listening on port 3000
2016-06-19T09:37:39.331Z - error: Error occurred during table initialization ConnectionError: Login failed for user 'azuremobile'. Reason: The password of the account must be changed.
at Connection. (C:\Users\George\Source\Repos\backend\node_modules\mssql\lib\tedious.js:378:25)
at Connection.g (events.js:260:16)
at emitOne (events.js:77:13)
at Connection.emit (events.js:169:7)
at Connection.processLogin7Response (C:\Users\George\Source\Repos\backend\node_modules\tedious\lib\connection.js:672:16)
at Connection.message (C:\Users\George\Source\Repos\backend\node_modules\tedious\lib\connection.js:1082:21)
at Connection.dispatchEvent (C:\Users\George\Source\Repos\backend\node_modules\tedious\lib\connection.js:519:45)
at MessageIO. (C:\Users\George\Source\Repos\backend\node_modules\tedious\lib\connection.js:439:23)
at emitNone (events.js:67:13)
at MessageIO.emit (events.js:166:7)

This seems to be because of the setting that is shown below, "User Must change password at next login"?

enter image description here

However, If I change the password, or delete and recreate the login but unchecking that feature. I get this:

Error occurred during table initialization ConnectionError: Login failed for user 'azuremobile'.

I am possibly getting the password wrong, but I have tried this 6 times now. Is there a way I can check the password or anything else I can do to get my node project to login to my local SQL Server database?

Update:

Here is my UserMapping:

enter image description here

closed as unclear what you're asking by Michael Green, Andriy M, Philᵀᴹ, RLF, RolandoMySQLDBA Jun 20 '16 at 17:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Have you made sure that the login you are creating has an appropriate user mapping for the database you're trying to connect to ? – druzin Jun 19 '16 at 11:19
  • @druzin How could I check that? In SQL Server Managment Studio, that login isn't mapped to any credentials? – George Edwards Jun 19 '16 at 11:26
  • What does it say on the User Mapping page of the user creation dialog ? – druzin Jun 19 '16 at 11:27
  • @druzin Sure, see the screenshot I have added to the question – George Edwards Jun 19 '16 at 11:31
  • 1
    What is the name of the database you are trying to connect to in your project though ( Initial catalog ) – druzin Jun 19 '16 at 11:42
0

Ahh, I had a typo in the name of my database... There was nothing wrong with the credentials!

Not the answer you're looking for? Browse other questions tagged or ask your own question.