title: Login failed when I trying to connect to a SQL Server using sqlcmd (from Ubuntu command line)?
body: <p>I am finding some problem trying to connect to a SQL Server instance from an Ubuntu machine using sqlcmd. The SQL server instance run on another server that is an always on MS-SQL Server cluster.</p>
  
  <p>So I installed sqlcmd as explained here: <a href="https://docs.microsoft.com/it-it/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15#ubuntu" rel="nofollow noreferrer">https://docs.microsoft.com/it-it/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15#ubuntu</a></p>
  
  <p>The SQL server seems to be reachable because I can successfully connect to the 1433 port of its IP via Telnet.</p>
  
  <p>Then I tried to connect to one of my database on this server, in this way:</p>
  
  <pre><code>./sqlcmd -S MY-IP-ADDRESS -d ESB_WSO2_USER_DB -U datacenter\\wso2DBAdmin
  </code></pre>
  
  <p>Where:</p>
  
  <ul>
  <li><strong>ESB_WSO2_USER_DB</strong> is the DB name</li>
  <li><strong>datacenter\wso2DBAdmin</strong> is the domain\username</li>
  </ul>
  
  <p>It ask me the password, I insert the password (pretty sure that the credential should be ok) but I am obtaining this error message:</p>
  
  <blockquote>
    <p>Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed
    for user 'datacenter\wso2DBAdmin'..</p>
  </blockquote>
  
  <p>Assuming that username and password are correct: what could be the problem? Is it something that could be related to my sqlcmd installation (maybe some missconfiguration), or the driver? or something related to my connection string? or something related to the SQL Server database? </p>