I have mssql in my windows host machine, and ubuntu in VMware. I try to connect this mssql from virtual machine with pyodbc module in python.
import pyodbc
server = '192.168.0.19'//host ip
database = 'mytestdb'
username = 'sa'
port = "1433"
password = 'mypassword'
cnxn = pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};SERVER='+server+';PORT='+port+';DATABASE='+database+';UID='+username+';PWD='+ password)
cursor = cnxn.cursor()
remote connection to my mssql instance is already enabled and I can login using same credentials so what might be problem here?