When an Engine Yard Cloud environment is created, a database is set up for the application and a database.yml file is generated. The database.yml file contains key information about your database.
The database.yml is written to the /data/app_name/shared/config/ directory in the application and database instance (single server environment) or the application master instance (clustered environment).
Note: Environments without databases do not have a database.yml file generated by Engine Yard Cloud. Enabling the "No database" option means that you are either not using ActiveRecord or you have supplied your own database.yml file in your repository.
Here are some example database.yml files.
For a MySQL master database
For a PostgreSQL database cluster with a master database and a slave database
database name. The database is always named the same as your application. In examples,
myappis the application name.
username. This is the name of the database user. This username is always deploy.
password. This is the password for the deploy database user and also the root database user. It is an automatically-generated, case-sensitive, alphanumeric string. In examples,
MyP4ssW0rdis the database password.
host. This identifies the server instance that is hosting the database.
To view your database.yml file
Via SSH, connect to the application and database instance (for single server environment) or the application master instance (for a clustered environment).
where “myapp” is the name of your application.
Make note of the database password.
You need this password to manage your database.
About typing the MySQL password in command lines
For security, Engine Yard recommends the
-p syntax in command lines instead of
-pMyP4ssW0rd. If you type the password in the command line, it is saved to the shell history.
However, if security is not a concern, you can use the
--password=MyP4ssW0rd syntax to skip the password prompt.
|For more information about...
|SSHing into an instance
|Connect to your instance via SSH
|No database option
|Create an Environment
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.