summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/40-patch_mysql_config.inc
diff options
context:
space:
mode:
authorroot2014-07-20 15:15:59 +0200
committerroot2014-07-20 15:15:59 +0200
commitfe3cafdebed1582d284d66a084a204619bf8ac93 (patch)
tree286f8246357cdb5dd091be445a0236fb4854395b /satellit_installer/includes/40-patch_mysql_config.inc
parent[SSPS] simple mysql config patcher, utf8 entries (diff)
downloadsetup-scripts-fe3cafdebed1582d284d66a084a204619bf8ac93.tar.gz
setup-scripts-fe3cafdebed1582d284d66a084a204619bf8ac93.tar.xz
setup-scripts-fe3cafdebed1582d284d66a084a204619bf8ac93.zip
[SSPS] mysql utf8 patch
Diffstat (limited to 'satellit_installer/includes/40-patch_mysql_config.inc')
-rw-r--r--satellit_installer/includes/40-patch_mysql_config.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/satellit_installer/includes/40-patch_mysql_config.inc b/satellit_installer/includes/40-patch_mysql_config.inc
index adc6164..ccbf639 100644
--- a/satellit_installer/includes/40-patch_mysql_config.inc
+++ b/satellit_installer/includes/40-patch_mysql_config.inc
@@ -4,9 +4,9 @@ patch_mysql_config() {
echo -n "# Patching utf8 entries into /etc/mysql/my.cnf..."
cp -p /etc/mysql/my.cnf /etc/mysql/my.cnf.$(date +%Y%m%d%H%M%S)
if [ $(grep -c '# openslx patch marker #' /etc/mysql/my.cnf) -eq 0 ]; then
- sed -i 's/\[client\]/\[client\]\ndefault-character-set = utf8/g' /etc/mysql/my.cnf
- sed -i 's/\[mysql\]/\[mysql\]\ndefault-character-set = utf8/g' /etc/mysql/my.cnf
- sed -i 's/\[mysqld\]/\[mysqld\]\ndefault-character-set = utf8/g' /etc/mysql/my.cnf
+ # sed -i 's/\[client\]/\[client\]\ndefault-character-set = utf8/g' /etc/mysql/my.cnf
+ # sed -i 's/\[mysql\]/\[mysql\]\ndefault-character-set = utf8/g' /etc/mysql/my.cnf
+ sed -i "s#\[mysqld\]#\[mysqld\]\ninit_connect=\'SET collation_connection \= utf8_unicode_ci\'\ninit_connect=\'SET NAMES utf8\'\ncharacter-set-server=utf8\ncollation-server=utf8_unicode_ci\nskip-character-set-client-handshake#g" /etc/mysql/my.cnf
echo '# openslx patch marker #' >> /etc/mysql/my.cnf
echo " ok."
else