MSSQL Authentication failed against database server
I was trying to connect to MSSQL server that runs on azure.
Both commands
npx prisma db pull
and prisma studio
are able to connect and pull the data
but when I am trying to connect during the runtime of the application, i get PrismaClientInitializationError: Authentication failed against database server at....
I am using a simple DATABASE_URL in a .env file to connect, and here is my db.ts file
Yeah, I am not sure what causes the issue, but it is odd because the npx prisma db pull
and prisma studio
use same connection string
I wonder if anyone else had a similar experience.2 Replies
Ok, I did resolve it. It might be something the dev team would want to look into.
The issue was in the way Prismaclient parsed that connection string. I had several special characters in my password, but i think having multiple '@' threw it off. I updated my password to remove most of the special characters and '@' and it worked fine.
Hey @KB 👋
Thank you for letting us know. Can you confirm if you were on the latest prisma version 5.21?