Import MySQL Local Database to ClearDB

I’m using mysql for some of wordpress project but the project need to deploy on heroku. As you know heroku has no addons for mysql, for the alternative heroku using ClearDB (MySQL cloud service).

Here is how to import your local database to cleardb.

mysql --host=<cleardb_host> --user=<cleardb_user> --password=<cleardb_password> --reconnect <cleardb_database_name> < your_local.sql

If you don’t know how to get cleardb host, open your heroku dashboard then select your apps settings. Then open “Reveal Config Vars”.
You will get CLEARDB_DATABASE_URL following below.

The bold text is your database host url. 😀

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.