Engineyard: Connect to database in production / staging

You can connect to databases hosted inside Database Instances in Engineyard servers from your local computer using softwares like MySqlWorkbench. Follow the following guidelines to do so.

Connection Method: Standard TCP/IP over SSH

Staging
SSH hostname ec2-24-134-112-720.compute-1.amazonaws.com:22
SSH username deploy
SSH Password Not Needed if we using SSH private key to connect
SSH key file path to your SSH private key file
For Example:
/home/shiva/.ssh/id_rsa
MySql Hostname 127.0.0.1
MySQl server Port 3306
MySql Username deploy
DB Password xxxxxx
Production
SSH hostname ec2-44-20-166-154.compute-1.amazonaws.com:22
SSH username deploy
SSH Password Not Needed if we using SSH private key to connect
SSH key file path to your SSH private key file
For Example:
/home/shiva/.ssh/id_rsa
MySql Hostname 127.0.0.1
MySQl server Port 3306
MySql Username deploy
DB Password XXXXXXXXXX

To get the latest creds for Database use the following command

ey ssh ‘cat /data/[YourApp]/shared/config/database.yml’ -e sps_production

 
ey ssh ‘cat /data/[YourApp]/shared/config/database.yml’ -e sps_staging

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s