好像不止遇到一次,直接Google就可以了,在stackoverflow中就有答案,答案就是你没有开MySQL - -。
stackoverflow链接见 http://stackoverflow.com/questions/16325607/cant-connect-to-local-mysql-server-through-socket-tmp-mysql-sock
开启MySQL的命令如下:
mysql.server start
MAC中Django中runserver提示Can't connect to local MySQL server through socket '/tmp/mysql.sock错误
时间: 2024-12-26 19:42:19