I have 3 dbs in Azure which I tried connecting to one of them.
conn = pymssql.connect(server='hostname.database.windows.net',
user='username@hostname',
password='*****',
database='my_db',
timeout=0,
login_timeout=60,
charset='UTF-8',
as_dict=False,
host='',
port='1433')
cursor = conn.cursor()
cursor.execute('select db_name()') #to get the name of my db (which should be "my_db")
result = cursor.fetchone()
print result
But what I've got is "master" which is default Azure database. This shouldn't happen because I've already specify 'databse' string argument to "my_db".
Please advice.