I have a number of services I need to run on my own EC2 instances as Heroku can’t handle the dependencies. Since I can’t connect to a Heroku shared Postegres instance outside of the Heroku context, I needed something that would let me do so.

Enter Xeround. They offer MySQL as a service, and it feels very similar to Heroku’s service. And it’s free. Since we use MySQL in production (Heroku is our staging instance), this is really awesome!

Migrating from Heroku to Xeround took a bit of thought, though. Here’s what I did.

  1. Sign up and configure your Xeround account. Note: After you create your DB instance you need to actually create your db (via phpMyAdmin from their dashboard). This was not obvious at first.
  2. Running MySQL locally, run `heroku db:pull mysql2://<db username>:<db password>@<db host>/<db name>` to backup your Heroku database.
  3. Now do a MySQL dump and pipe that in to your Xeround instance: `mysqldump -u<local username> <db name> | mysql -u <xeround user> -h <xeround host> -P <xeround port> -D <xeround db name> -p`
  4. Enter your password.
  5. Go grab some coffee.
  6. Come back and check to make sure everything was properly populated!

Viola! Easy peasy. Just change your Heroku config and you’re in bidness.

Advertisements