I want to install a php script with a database on heroku. How I can get the database name, password, user, and host information for the database I install?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are several different databases available on Heroku – you can view the options and add them to your app at addons.heroku.com. Probably the first/most basic database is Postgres – here is the heroku Postgres tutorial. Quoted from the relevant section:
Heroku config vars are set as environment variables when your app is created. Thus you can probably read the
DATABASE_URLenvironment variable to get the information you need to connect to your database.