title: Connect with Pymssql / Adaptive Server connection failed (Windows.net vs Azure.com)
body: <p>I am trying to connect to a new database using the below method I have used many times previously:</p>
  
  <pre><code>import pymssql
  server = "servername.database.windows.net"
  user = "user"
  password = "pwd"
  conn = pymssql.connect(server, user, password, "DB")
  </code></pre>
  
  <p>I am getting this error message:</p>
  
  <pre><code>MSSQLDatabaseException: (20004, b'DB-Lib error message 20004, severity 9:\nRead from the server failed (servername.database.windows.net:1433)\nNet-Lib error during Connection reset by peer (54)\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (servername.database.windows.net:1433)\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (servername.database.windows.net:1433)\nNet-Lib error during Operation timed out (60)\n')
  </code></pre>
  
  <p>One of the first suggestions from other posts is to check the install of FreeTDS. My FreeTDS is up to date and I have had no problem connecting to another server: "server2.cloudapp.azure.com". Both are azure sqlserver's so I am unsure what the connection issue could be. Why would this be? Any help is appreciated.</p>