开发者社区 问答 正文

Django连接数据库报错,Connection to db failed ?报错

连接MySQL报错了,问题出在哪呢,求大佬指点
Connection to db failed.
[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

展开
收起
爱吃鱼的程序员 2020-06-23 20:50:45 652 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    连接数据库失败的提示是“权限不足”,可能是数据库服务器对来访IP做了限制,或则用户名和密码不对。都检查下。

    有没有导入pymysql模块?

    2020-06-23 20:51:02
    赞同 展开评论