Use remote MySQL Connect to remote MySQL Database from Heroku on Heroku

Source: Internet
Author: User
Tags mysql connect

0.bundle Install--without devlopment, test, Docbundle updatebundle installgit Add. Git commit-m "" Git push-u Origin Mas Ter1. $heroku login2. $heroku Create3. $git Push Heroku master4.0 Add credit card information on heroku.com4.1 $heroku addons:add cleardb:ignite4.2 $heroku confi G5.  $heroku addons== Resources for Appnameplan Name Price--------------------------- ------------------------cleardb:ignite budding-freely-9331 Freeheroku-postgresql:hobby-dev flying-calmly -8591 free=== Attachments for Appnamename add-on billing App------------------------------- -------------------cleardb_database budding-freely-9331 appnamedatabase flying-calmly-8591 appname6. Heroku Addons:destroy flying-calmly-8591--confirm appname6.1 $heroku config--cleardb_database_url:mysql://[email  protected]/...reconnect=truelang:en_us.        Utf-8rack_env:productionrails_env:    Production--7. $heroku Config:set database_url=mysql2://username:[email protected]:3306/dbnamecleardb_database_url:mysql:/ /... database_url:mysql2://... 8. $heroku Config:add Tz=asia/tokyo (optional) 8.1 $heroku Config:add lang=ja_jp. UTF-8 (optional) 9. It seems that if you run the following command before the deploy, you can run step 10 directly after step 8. If you do not run these two commands, after 8 Heroku run rake db:create or migrate all error. Said MYSQL2 did not load, but in gemfile there, unexplained $rake db:create rails_env=production$rake db:migrate rails_env=production9.1 $heroku Run Rake Db:migrate10. $heroku Open

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Use remote MySQL Connect to remote MySQL Database from Heroku on Heroku

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.