O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the MySQL configuration settings

The MySQL database stores its configuration settings in the my.cnf file. This file is located under the conf directory inside the MySQL cartridge installation. As mentioned in the previous recipe, OpenShift does not allow users to update the my.cnf configuration file. The solution is to use a set of environment variables to configure various settings of the MySQL database.

At the time of writing this book, you could configure the following MySQL settings through the environment variables:

MySQL setting

OpenShift environment variable

lower_case_table_names

OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES

default-storage-engine

OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE

max_connections

OPENSHIFT_MYSQL_MAX_CONNECTIONS ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required