When I try to login to mysql on my server via console, I get:
$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysqld/mysqld.sock' (38)
It's trying to go to the wrong socket. Via phpmyadmin, I know it's working correctly at a different socket location: /tmp/mysqld/mysqld.sock (for instance)
How do I change the default socket location from console, so it always points to the correct location?