1

I got a problem creating the database on my cloudcontrol app:

xxx:~/Sites/e_paper$ cctrlapp epaper/default run "rake db:create"
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "database"=>"xxx", "host"=>"mysqlsdb.xxx.eu-west-1.rds.amazonaws.com", "port"=>3306, "username"=>"xxx", "password"=>"xxx"}, charset: utf8, collation: utf8_unicode_ci
(if you set the charset manually, make sure you have a matching collation)
Connection to ssh.cloudcontrolled.net closed.

And my database.yml looks like this:

production:
  adapter: mysql2
  encoding: utf8
  pool: 5
  database: <%= "'#{ ENV['MYSQLS_DATABASE'] }'" %>
  host: <%= "'#{ ENV['MYSQLS_HOSTNAME'] }'" %>
  port: <%= ENV["MYSQLS_PORT"] %>
  username: <%= "'#{ ENV['MYSQLS_USERNAME'] }'" %>
  password: <%= "'#{ ENV['MYSQLS_PASSWORD'] }'" %>

Credentials on the website match.

Any ideas?

Cojones
  • 2,930
  • 4
  • 29
  • 41

1 Answers1

2

All you need to do is, reduce the pool size to 2 (for the free mysql addon). This configuration worked for me:

production:
  adapter: mysql2
  encoding: utf8
  pool: 2
  database: <%= "'#{ ENV['MYSQLS_DATABASE'] }'" %>
  host: <%= "'#{ ENV['MYSQLS_HOSTNAME'] }'" %>
  port: <%= ENV["MYSQLS_PORT"] %>
  username: <%= "'#{ ENV['MYSQLS_USERNAME'] }'" %>
  password: <%= "'#{ ENV['MYSQLS_PASSWORD'] }'" %>
Cojones
  • 2,930
  • 4
  • 29
  • 41