Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Check if the mysql process is running (ps ax | grep mysql). looks like you can use the --socket option, the MYSQL_UNIX_PORT environment variable, or various .cnf files to get mysql to check a different socket path. Since the command looks like it's checking a non-default path, maybe docker or some other process updated that env?
    – Cpt.Whale
    Commented Jan 26 at 20:58
  • @Cpt.Whale The server is running. Only see an auto.cnf file (and has no directory related to one in question). Do you know what the default path is supposed to be? Possible Docker altered this I suppose (and the source of the issue, as this worked until I used Docker and MySQL image)
    – Chris
    Commented Jan 27 at 0:34
  • The default directory is where the sock file currently exists: /var/run/mysqld/mysqld.sock. The mysql command error says it's checking for /tmp/mysql.sock, so I'm curious if set | grep MYSQL shows something unexpected. You might just need to link it like ln -s /private/var/mysql/mysql.sock /tmp/mysql.sock like in the answer here: stackoverflow.com/a/18418296/7411885 there are some other good troubleshooting steps in there as well
    – Cpt.Whale
    Commented Jan 29 at 16:40
  • @Cpt.Whale thanks, bud...nothing interesting output from the set... call. I theorize Docker changed some default directory where the sock file is being referenced (ie, from default /var/run... to the /tmp location)...nothing turned up doing a find for the location, do you know where the socket directory is specified in some mysql config file so I can change it back to where it actually exists?
    – Chris
    Commented Jan 29 at 19:57