Skip to content

SQL Server error 18456: Login failed for user

SQL Server rejected the login attempt. A typical server message is:

Login failed for user 'docs_user'.

The error number is 18456. It identifies an authentication failure, which can involve the account, authentication mode or requested database.

Check these in order:

  1. Incorrect SQL user or password.
  2. The right credentials sent to the wrong server or instance.
  3. A disabled login or a password that requires attention.
  4. SQL authentication disabled on the server.
  5. A database the user cannot open, including an unavailable default database.

Microsoft’s 18456 reference explains the server-side causes. Ask an administrator to read the SQL Server error log for the detailed reason and state.

Check Host, Port, Database and SQL User against the intended instance. Re-enter the password if it changed after you saved the connection.

Ask the administrator to confirm that the login is enabled, SQL authentication is permitted and the login has access to the requested database. If the default database is unavailable, enter an accessible database explicitly in Database.

Use the local connection guide to check the form. Send an administrator the server, port, database, user, error text and attempt time. Never send the password.

Confirm that Port reaches the intended container, especially when several instances run on one host. The Docker guide explains published ports and reused-volume credentials.

Enter the target database explicitly and use the SQL user configured for it. Ask the database administrator to confirm the user’s access to that database.

If the message says the client IP is not allowed, check the Azure network settings instead.

TableAI identifies server error 18456 as Authentication Failed and suggests checking the SQL login and password. Open the error details to read the available database message and code before changing settings.

A failed connection test can also report:

SQL Server rejected the username or password. Verify SQL authentication is enabled and re-enter the password.

After correcting the account or connection details, click Test again.

Use connection failed for network and TLS checks. Return to the SQL Server overview or continue with write and run SQL after connecting.