Question
How can I explicitly tell the MySQL client to use TCP/IP instead of the socket file to connect locally?
Asked by: USER2649
103 Viewed
103 Answers
Responsive Ad After Question
Answer (103)
You can force the MySQL client to use TCP/IP for local connections by specifying the host as `127.0.0.1` or `localhost` and using the `--port` option if it's not the default (3306). For example: `mysql -u your_user -p --host=127.0.0.1 --port=3306`. This bypasses the socket file entirely.