Rails 3: Can’t connect to MySQL server on ‘localhost’ (10061)

I’ve just faced up with some funny problem with Rails and setting up a connection to MySQL-database.
I am using the command prompt to export the schema of some database:

rake db:schema:dump

I am getting the output:

** Execute db:schema:dump
rake aborted!
Can’t connect to MySQL server on ‘localhost’ (10061)

I’ve found the solution for the problem: it is necessary to edit the config/database.yml file and changing the host property: use instead of localhost.

Leave a Reply (Markdown is enabled)

Your email address will not be published. Required fields are marked *