From c90d4068fb24a6688e38026905a7edb3a7f2a343 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Wed, 24 Sep 2014 17:08:18 +0530 Subject: [PATCH] setup my.cnf for percona mysql-server --- src/modules/stack/install/ee_mod_setup_mysql.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/stack/install/ee_mod_setup_mysql.sh b/src/modules/stack/install/ee_mod_setup_mysql.sh index d40ccdc6..e6b9793a 100644 --- a/src/modules/stack/install/ee_mod_setup_mysql.sh +++ b/src/modules/stack/install/ee_mod_setup_mysql.sh @@ -5,8 +5,7 @@ function ee_mod_setup_mysql() ee_lib_echo "Setting up Percona MySQL, please wait..." # Setting wait_timeout = 30 & interactive_timeout = 60 - grep "_timeout" /etc/mysql/my.cnf &>> $EE_COMMAND_LOG - if [ $? -ne 0 ]; then - sed -i "/#max_connections/a wait_timeout = 30 \ninteractive_timeout = 60" /etc/mysql/my.cnf + if [ ! -f /etc/mysql/my.cnf ]; then + echo -e "[mysqld] \nwait_timeout = 30 \ninteractive_timeout = 60" &>> /etc/mysql/my.cnf fi }