raise ex django.db.utils.OperationalError: Login failed for user 'myusername'.
SadraSalman opened this issue · comments
I changed settings.py like yours:
DATABASES = {
'default': {
'ENGINE': os.environ.get('BACKEND', 'sqlserver'),
'NAME': "DB",
# 'TEST_NAME': DATABASE,
'HOST': 'SADRA',
'USER': "hooman",
'PASSWORD': "behnejad",
'OPTIONS': {
'provider': os.environ.get('ADO_PROVIDER', 'SQLNCLI11'),
# 'extra_params': 'DataTypeCompatibility=80;MARS Connection=True;',
'use_legacy_date_fields': False,
},
},
'other': {
'ENGINE': os.environ.get('BACKEND', 'sqlserver'),
'NAME': DATABASE + '_other',
'TEST_NAME': DATABASE + '_other',
'HOST': HOST,
'USER': USER,
'PASSWORD': PASSWORD,
'OPTIONS': {
'provider': os.environ.get('ADO_PROVIDER', 'SQLNCLI11'),
# 'extra_params': 'DataTypeCompatibility=80;MARS Connection=True;',
'use_legacy_date_fields': False,
},
}
}
but I have this error:
raise ex django.db.utils.OperationalError: Login failed for user 'myusername'.
i have already checked my username and password in SQL authentication mode :)
help me with this man ?
Try logging in to the same server with same username/password via MS SQL Management Studio and try opening same database. Maybe your user doesn't have access to the database.
you r my main man , that does the job , thanks a lot pal :)