Can I change my.inf in OpenShift without root access?

675 Views Asked by At

I want to sync a local database with OpenShift MySQL, but I can't change my.inf because I don't have root access. Is it possible to get root access on OpenShift?

1

There are 1 best solutions below

4
Jiri Fiala On

I believe you are interested in my.cnf. If you ssh into your gear (rhc ssh <yourApp>) and check the file (~/mysql/conf/my.cnf), you will see that it's owned by you, the root access is not needed.

However, if you check the beginning of the file, you will see:

# WARNING: Changes to this file will be lost on every restart/upgrade.  Configurable values can be set with environment variables through rhc env set...
#
# Ex: rhc env set OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES=1 -a myapp && rhc cartridge restart -c mysql-5.5 -a myapp
#
# Configurable Values:
# lower_case_table_names -> OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES
# default-storage-engine -> OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE
# max_connections -> OPENSHIFT_MYSQL_MAX_CONNECTIONS
# ft_min_word_len -> OPENSHIFT_MYSQL_FT_MIN_WORD_LEN
# ft_max_word_len -> OPENSHIFT_MYSQL_FT_MAX_WORD_LEN

Which should answer your question on what is configurable and how to do it.