Drush can't connect to local MySQL through socket on WAMP Trying to set up Drush with in a local dev environment on Windows 7 and can't get MySQL properly configured. A test command I've been running via Cygwin, with the resulting error, is as follows:

$ drush sql-query "SELECT * FROM erg_node WHERE nid=3"
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


I can run the same SQL statement in phpmyadmin and it works fine. I can run the same drush command with a remote site and it also works, so it seems like it must be related to how MySQL is configured with WAMP and Cygwin. When I check which mysql via Cygwin, I get back /usr/bin/mysql instead of the path for WAMP's mysql. But the WAMP mysql path is set in my system environment PATH variable, so it should be accessible.

I've tried changing my.ini to include host = 127.0.0.1, copied the my.ini file to /etc/my.cnf, and run chmod -R 755 /tmp/. I'm not sure if there's something else I need to do to ensure drush uses the WAMP mysql command? Any help would be appreciated. Thank you!
For anyone else with this problem, it was an issue with the PATH variable. I had to add the path to the version of mysql that I wanted to use (the WAMP version) to the beginning of my PATH variable in my .bash_profile. SO post regarding PATH variable in .bash_profile.