Django设置超级用户时报错

Django设置超级用户:

python3 manage.py createsuperuser

报错:

... ...
_mysql_exceptions.ProgrammingError: (1146, "Table 'test.auth_user' doesn't exist")
... ...
django.db.utils.ProgrammingError: (1146, "Table 'test.auth_user' doesn't exist")

解决:
先执行:

python3 manage.py migrate

再执行:

python3 manage.py createsuperuser
输入用户名

参考资料:https://www.cnblogs.com/lilinpging/p/7793172.html

你可能感兴趣的:(Django设置超级用户时报错)