当前位置:网站首页>django.db.utils.OperationalError: (2002, “Can‘t connect to local MySQL server through socket ‘/var/r
django.db.utils.OperationalError: (2002, “Can‘t connect to local MySQL server through socket ‘/var/r
2022-07-24 06:27:00 【Bevis_OTL】
Django报错
问题:python3 manage.py makemigrations 时报错如下:
django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
解决办法:
django 中settting.py中的DATABASE中的 HOST 修改为:
'HOST': '127.0.0.1',
原因:
If host is set to localhost, then a socket or pipe is used.
If host is set to 127.0.0.1, then the client is forced to use TCP/IP.
边栏推荐
猜你喜欢

SPI——发送16位和8位数据

Redis sentinel mechanism

Prediction of advertising investment and sales based on regression analysis -- K neighborhood, decision tree, random forest, linear regression, ridge regression

It can be written in 10 minutes -- 25~30k foreign enterprise recruitment interview questions, isn't it easy~

《大厂面试》之JVM篇21问与答

第二部分—C语言提高篇_4. 二级指针

Huawei experts' self statement: how to become an excellent engineer

Take you to learn C step by step (second)

Tensorflow Einstein function

sojson jsjiami.com. V6 crawler JS reverse
随机推荐
《大厂面试》之JVM篇21问与答
Talk about your thoughts about the future
metaRTC5.0实现君正的纯C的webrtc版IPC
You can't satisfy everyone!
Neo4j modify tag name
STM32 ADC based on Hal library uses DMA multi-channel sampling and solves the problems encountered
reflex
GIMP自定义截图
[learning notes] Web page rendering process
xavier_ normal_ Initialization test
【方向盘】IDEA的代码审查能力,来保证代码质量
Sealos packages and deploys kubesphere container platform
你是谁由你自己决定!
ROS starts non native nodes
第一部分—C语言基础篇_11. 综合项目-贪吃蛇
Penetration learning - SQL injection - shooting range - installation and bypass experiment of safety dog (it will be updated later)
Do you really know the judgement sentence?
在线问题反馈模块实战(十二):实现图片删除功能
Jsonobject is sorted in A-Z order of key
tensorflow scatter_nd函数