用户“DrChitraDhawle”@“ip1018112522.ec2.internal”(使用密码:YES)的访问被拒绝

2024-06-07 15:44:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在用pythonywhere部署带有MySQL数据库的django网站,它的链接是-http://drchitradhawle.pythonanywhere.com/,但是在运行命令时

python manage.py migrate

我的bash出现了以下错误-

在django.db.utils。操作错误:(1045,“拒绝用户'DrChitraDhawle'@'ip-10-181-125-22.ec2.internal'(使用密码:YES)”)

settings.py file is-

DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'django _db',
    'USER': 'DrChitraDhawle',
    'PASSWORD': 'r.....6',
    'HOST': 'mysql.server',
    'PORT': '',
    }
}

pythonywhere中的数据库设置是-

{1美元^

Note:- I have just created the database name from Database tab, but not created the actual database anywhere ie. i have not created any table as i dont know where to create.


Tags: thedjangopy数据库db部署have错误

热门问题