Browse Source

Check /etc/mysql/my.cnf

bugfixes
Mitesh Shah 10 years ago
parent
commit
3e6c5f5cb7
  1. 10
      src/modules/stack/install/ee_mod_setup_mysql.sh

10
src/modules/stack/install/ee_mod_setup_mysql.sh

@ -5,8 +5,12 @@ 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
else
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
fi
fi
}

Loading…
Cancel
Save