0 环境
系统环境: centos7 编辑器: xshell 和 IDEA
1 准备
首先 确保mysql连接无问题 确定在django中配置mysql的格式和内容是对的 以及需要的库都装好了 文章参考(mysqlclient 1.3.13 or newer is required you have 0.9.3问题)
2 解决
❝解决了上面的问题 django还是报错如下图
❞


# 先删除旧有的文件(0xxx_initxxx.py)
# 生成表
python manage.py makemigrations
python manage.py migrate
# 启动访问 查看数据库确实有表了
python manage.py runserver