If you are unsure where your socket is located, login using the MySQL command line client and run this query :.
Make sure that the socket setting in database.yml matches the value of the socket variable reported by MySQL.