线上运行时发现一个问题: python manage.py runserver _mysql_exceptions.OperationalError: (2002, “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)”) 解决:把链接的localhost改为127.0.0.1就可以了 小杰博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 转载请注明原文链接:Can’t connect to local MySQL server through socket 喜欢 (0)