title: pyodbc always connects to master database
body: <p>I am using <strong>pyodbc</strong> to connect to an azure sql database. My source code looks like this:</p>
  
  <pre><code>import pyodbc
  
  server = 'sqlserver.database.windows.net'
  database = 'database'
  username = 'username'
  password = 'password'
  
  conn= pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server}'+';SERVER='+server+';PORT=1443;DATABASE='+database+';UID='+username+';PWD='+ password ';Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;')
  cursor = conn.cursor()
  cursor.execute("query")
  </code></pre>
  
  <p>I am able to connect to a sql database. The only thing which is not working properly is that pyodbc does not connect to the database I have specified in the <code>database</code> variable. It always connects to the master database.</p>
  
  <p>What I have tried so far is to print the name of the databases on the target sql server using <code>SELECT * FROM sys.databases</code> while being connected to the master database. I was able to see the database I am trying to connect to. Anyone got an idea what goes wrong in my source code?</p>