Skip to content

Instantly share code, notes, and snippets.

@marcialca
Created November 9, 2012 01:22
Show Gist options
  • Save marcialca/4043123 to your computer and use it in GitHub Desktop.
Save marcialca/4043123 to your computer and use it in GitHub Desktop.
[Rails] Can’t connect to MySQL server on ‘localhost’
My simple work around was going to config/database.yml file and changing the host to use 127.0.0.1 instead of localhost as follows.
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: quiz_development
pool: 5
username: root
password:
host: 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment