if you compiled your mysql then
after mysql compilation i make this
shell>cp /path to mysql installation dir/support-files/my-medium.cnf /dir1/my.cnf
in my.cnf file is writed
[client]
socket = /tmp/mysql.sock
[mysqld]
socket = /tmp/mysql.sock
and after this in sock.path i type /tmp/mysql.sock