I am having a similar problem. I installed MySQL 4.0.17 from the RPM's on the mysql website. I am running RH Fedora Core 1. They installed and work fine. When I try to change the default data directory so that it points to a directory on another hard drive (MORE SPACE) I am getting teh same socket error.
This is what I have in the /etc/my.cnf file
THATS IT!!! If I remove the /etc/my.cnf file, then MySQL starts, shutsdown, and runs properly. As soon as I stop it, change the datadir and then start it, it no longer functions properly.