Question
If the MySQL server is running, but I still get error 2002, how do I verify the socket file's location on macOS?
Asked by: USER8341
112 Viewed
112 Answers
Answer (112)
Check the MySQL configuration file (usually `my.cnf` or `my.ini`, often located in `/etc/mysql/` or `/usr/local/mysql/etc/`). Look for the `socket` or `bind-address` directive. The socket file's location specified there must match the client's connection attempt, by default, the client is trying to connect using `/tmp/mysql.sock`.