Mac OS 10.6: Starting MySQL v5.1.44
if you're getting this error "ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)", chances are you haven't started MySQL yet. Try the commands below:
    cd /usr/local/mysql;
    sudo echo
    sudo ./bin/mysqld_safe &