13.5.5. Database Environment Variables


Database environment variables pertain to a database, if one exists, and are used to connect an application to a database. The exact variable names depend on the type of database; the value of <database> is MYSQL or POSTGRESQL as appropriate. Note that these connections are only available to an application internally; you cannot connect from an external source.
OpenShift Enterprise does not currently support user changes to environment variables. This includes changing the default MySQL admin password (even outside of phpMyAdmin). If the password is changed, ensure the change takes effect correctly. Note that this restriction only applies to the default administrative user. You can add more users as required, and specify a custom password for these users.
Table 13.6. Database Environment Variables
Environment Variable Name Purpose
OPENSHIFT_Cart_Name_DB_HOST The host name or IP address used to connect to the database.
OPENSHIFT_Cart_Name_DB_PORT The port the database server is listening on.
OPENSHIFT_Cart_Name_DB_USERNAME The database administrative user name.
OPENSHIFT_Cart_Name_DB_PASSWORD The database administrative user's password.
OPENSHIFT_Cart_Name_DB_SOCKET An AF socket for connecting to the database (for non-scaled apps only).
OPENSHIFT_Cart_Name_DB_URL Database connection URL.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.