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.
- 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.
- Running MySQL locally, run `heroku db:pull mysql2://<db username>:<db password>@<db host>/<db name>` to backup your Heroku database.
- 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`
- Enter your password.
- Go grab some coffee.
- Come back and check to make sure everything was properly populated!
Viola! Easy peasy. Just change your Heroku config and you’re in bidness.