Yeaz
Yeaz

Reputation: 11

bundle exec rake db:migrate hangs on Amazon EC2 and RDS

I have an EC2 instance (m3.medium) that runs my Rails application and connected to an RDS instance for the MySQL database.

When running 'bundle exec rake db:migrate', the process hangs indefinitely without outputting any error. Any ideas on how to debug this?

Upvotes: 1

Views: 1365

Answers (1)

Shamsul Haque
Shamsul Haque

Reputation: 2451

Edit the database.yml as:-

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: database_name
  pool: 5
  username: username
  password: password
  host: abcdef.amazonaws.com 

Run the migration as:-

bundle exec rake RAILS_ENV=production db:migrate

Upvotes: 2

Related Questions