5
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HerokuでMySQLセットアップ

Last updated at Posted at 2017-11-14

HerokuでMySQLを使う方法について紹介します。

  • インストール
# Install
heroku addons:add cleardb:ignite --app ${app_name}

# Install結果の確認
heroku addons --app ${app_name}
  • 接続情報確認
# AppのConfig確認
heroku config --app ${app_name}

# MySQLの接続情報は下記ように表示される
CLEARDB_DATABASE_URL: mysql://ユーザ名:パスワード@サーバ名/データベース?reconnect=true
  • 接続

MySQL Workbench/Sequel Proを使って、databaseにアクセス

※ 参考サイト
http://www.ownway.info/Ruby/heroku/how/management/database/cleardb

5
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?