尝试在django中迁移mysql数据库时出现获取connectiondoesnotexist错误

dtcbnfnu  于 2021-06-17  发布在  Mysql
关注(0)|答案(1)|浏览(311)

以下是我在django settings.py中为数据库编写的代码:

DATABASES= {
    'defualt': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'cameronkc',
        'USER': 'root',
        'PASSWORD': '123456',
        'HOST': 'localhost',
        'PORT': ''
    }
}

以下是在命令提示符下执行>python manage.py migrate时收到的错误

django.db.utils.ConnectionDoesNotExist: The connection default doesn't exist
4urapxun

4urapxun1#

你把默认值拼错了 DATABASES 听写变化 'defualt''default' .

相关问题