Yes, mysql by default sets the socket file in the below directory /var/lib/mysql/mysql.sock.
But why does it refer to /tmp/mysql.sock file then, as that was the error which was given when i tried to login to mysql. Is that hard-coded for MySQL5.1 source code, which is what i wanted to know ? Thanks