Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Bug 1000167
Browse files Browse the repository at this point in the history
  • Loading branch information
danmcp committed Sep 5, 2013
1 parent 24f388f commit 1b9b67a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cartridges/openshift-origin-cartridge-mysql/bin/control
Expand Up @@ -31,7 +31,8 @@ function is_running {
function start {
if ! is_running; then
echo "Starting MySQL cartridge"
/usr/bin/mysqld_safe --defaults-file=$OPENSHIFT_MYSQL_DIR/conf/my.cnf > /dev/null 2>&1 &
erb conf/my.cnf.erb.hidden > conf/my.cnf
/usr/bin/mysqld_safe --defaults-file=$OPENSHIFT_MYSQL_DIR/conf/my.cnf > /dev/null 2>&1 &
wait_for_mysqld_availability
else
echo "MySQL already running" 1>&2
Expand Down
2 changes: 2 additions & 0 deletions cartridges/openshift-origin-cartridge-mysql/bin/setup
@@ -1,3 +1,5 @@
#!/bin/bash -e

mkdir -p $OPENSHIFT_MYSQL_DIR/{log,pid,socket,data,run}

cp conf/my.cnf.erb conf/my.cnf.erb.hidden
10 changes: 9 additions & 1 deletion cartridges/openshift-origin-cartridge-mysql/conf/my.cnf.erb
@@ -1,3 +1,10 @@
# 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.1 -a myapp
#
# Configurable Values:
# lower_case_table_names -> OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES

[mysqld]
datadir=<%= ENV['OPENSHIFT_MYSQL_DIR'] %>/data/
socket=<%= ENV['OPENSHIFT_MYSQL_DB_SOCKET'] %>
Expand All @@ -7,11 +14,12 @@ symbolic-links=0
key_buffer_size = 16K
max_allowed_packet = 200M
table_open_cache = 4
sort_buffer_size = 64K
sort_buffer_size = 128K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 256K
lower_case_table_names = <%= ENV['OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES'] ? ENV['OPENSHIFT_MYSQL_LOWER_CASE_TABLE_NAMES'] : "0" %>


#INNODB
Expand Down
Expand Up @@ -9,7 +9,7 @@ locked_files:
- metadata/
- metadata/*
- conf/
- conf/*
- conf/my.cnf.erb.hidden
- hooks/
- hooks/*
processed_templates:
Expand Down

0 comments on commit 1b9b67a

Please sign in to comment.