Well if it doesn't let you move it by changing the value in my.cnf to the default location of /var/run/mysqld/mysqld.sock then you can connect by
mysql --user=username --pass=password --host=dbserver -S /tmp/mysql.sock database < /path/file.sql
if the socket is located at /tmp/mysql.sock.
You can also try setting the client to
automatically try it in the my.cnf.
[client]
socket=/tmp/mysql.sock
Though sometimes these things do not pay attention for some reason. If the [client] part does not work set the mysql.default_socket =/tmp/mysql.sock in the php.ini so at least when connecting from that you do not have to fudge about.
My email didn't show the quote bit so I missed you found the socket earlier.