0

I succesfully ported to Django app to heroku, and now I just need to push the database. I tried with:

heroku db:push mysql://root@localhost:themedb

and got the following error:

Loaded Taps v0.3.23
 !    Invalid database url

I'm pretty sure mysql://root@localhost:themedb is wrong but I dont know what part of it is. The database has no password so I skipped the password.

I appreciate any help.

UPDATE: As suggested by hgmnz I did:

heroku db:push mysql://root@localhost/themedb

but got the following:

Failed to connect to database:
  Sequel::AdapterNotFound -> LoadError: no such file to load -- mysql
leonsas
  • 4,718
  • 6
  • 43
  • 70

2 Answers2

0

Try running heroku config on the command line - do you have a DATABASE_URL config var for your database? If so, try pushing with that instead.

If you don't have a DATABASE_URL config var, have you added a mysql database to your app? If not you should first add a database from https://addons.heroku.com/ (or from the command line, if you prefer). If you have already added a database you may need to run heroku addons:add {addon-name} again from the command line to make sure the config var gets added.

culix
  • 10,188
  • 6
  • 36
  • 52
0

Try heroku db:push mysql://root@localhost/themedb, and I'd like to point you at valkyrie, the likely successor of taps.

hgmnz
  • 13,208
  • 4
  • 37
  • 41
  • That worked, *partially*. Now I'm getting a Failed to connect to database: Sequel::AdapterNotFound -> LoadError: no such file to load -- mysql – leonsas Sep 05 '12 at 02:35