I am trying to connect to MySQL from DJango. My settings.py file:
DATABASES = {
'default':{
'ENGINE': 'django.db.backends.mysql',
'Name': 'my_db',
'User': 'my_user',
'Password': 'my_pass',
'Host': 'localhost',
'Port': '3306'
}
}
}
I am getting following error.
django.db.utils.OperationalError: (1045, u"Access denied for user 'my_user'@'localhost' (using password: NO)")
I have tried following steps to solve the problem.
I have created the user:
create user 'my_user'@'localhost' identified by 'my_pass';
And granted access as follows:
grant all on *.* to 'my_user'@'localhost';
flush privileges;
But, even though my problem not yet fixed. Can someone help me?
Thanks.