DEV Community

Cover image for SQL Server “Login failed” in Laravel
Rafli Zocky
Rafli Zocky

Posted on • Originally published at Medium on

SQL Server “Login failed” in Laravel

I hit SQLSTATE[28000] Login failed for user 'sa' in Laravel even though everything looked correct (SSMS login, credentials, config, driver, etc.).

I tried almost everything: fixing .env, checking SQL Server setup in SSMS, verifying credentials — but nothing changed.

What actually resolved it:

I manually created the database first in SSMS, then ran Laravel migrations again.

After that, everything worked normally.

Not saying this is the “proper fix”, but in my case it unblocked the migration process immediately.

Hope this helps someone stuck on the same issue.

Need help building your app? I’m available for freelance web & Android development — raflizocky.netlify.app

☕ Support my writing: paypal.me/raflizocky · saweria.co/raflizocky

Top comments (0)