3

I just created a rails box in Nitrous IO. Rails boxes come predefined to use sqlite3 but I want to use mysql2. Since I can't use mysql from the box because it fires up an error that it can't connect to a socket, they can connect the box to a free database service in Heroku. I created an account in Heroku, and logged in from my box to heroku. I am having problems linking the database (cleardb) to the rails box in NitrousIO, since they only show procedure to link a postgres db.

My database.yml file has the following:

development:
 adapter: mysql2
 encoding: utf8
 database: testdb_development
 pool: 5
 username: root
 password:
 host: localhost
Ricardo
  • 369
  • 3
  • 5
  • 18

2 Answers2

2

Did you already configure the development settings within the database.yml file? You will need to change the host, username, and password fields which you listed above to match the settings of your cleardb.

Here is another post which states how to retrieve your host database URL: Remote connect to clearDB heroku database

On the top corner click on Addons and then select ClearDB MySQL Database. Once there, click on your database and choose the 'Endpoint Information' tab. There you see your username/password. The URL to the database can be acquired by running heroku config --app

In my case, it was something like: mysql://user:pass@us-cdbr-east.cleardb.com/TABLE?reconnect=true What you need is this part: us-cdbr-east.cleardb.com

Community
  • 1
  • 1
Greg
  • 1,589
  • 9
  • 14
0

[Update January 2014]

Boxes should use Autoparts to manage packages / services like MySQL, Postgres, Redis, etc...

Please see this article for more information:

http://help.nitrous.io/mysql/

ajhit406
  • 1,405
  • 1
  • 14
  • 17