How can the default Mysql storage engine be set in OpenShift?
Environment
- OpenShift Enterprise 1.2
- OpenShift Enterprise 2.0
- OpenShift Enterprise 2.1
- OpenShift Enterprise 2.2
- OpenShift Online
Issue
- When creating an application with a mysql database, the default storage engine
MyISAMis used. How can this be changed?
Resolution
The default storage engine for mysql is set with an environment variable. Add the cartridge, then run the below to use InnoDB:
$ rhc env add OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=InnoDB -a NameApp
$ rhc app-restart NameApp
Root Cause
See the mysql cartridge configuration where this is set.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
