Firstly, I swear that I have looked at every single question that references this error. Nearly every solution someone offers is different, and no one seems to understand th
As far as I can tell, it is either of the two things:
/tmp/mysql.sock
as its socketAs far as 2 is concerned, I believe that is the default setting for a freshly installed MySQL, but it doesn't hurt to check. Try looking at the contents of /etc/my.cnf
. Check whether there is a line that looks like this: socket=/path/to/socket
- where /path/to/socket
is, as it says the file path of the socket. If there is such an entry and the file path is different than /tmp/mysql.sock
, you've found your problem. Change either that line, or your Django config so they match.
Note: In case you don't find /etc/my.cnf
you can create it yourself and add the appropriate socket settings (i.e. just add the line socket=/tmp/mysql.sock
) just to make sure it's properly configured.
As far as 1 is concerned, you can follow the instructions available here and make sure your MySql server is running.
Good luck!