diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-01-07 03:22:08 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-01-07 11:24:25 +0300 |
commit | 30b0b6df98c3040811eba4a7aa3dcadc560f4152 (patch) | |
tree | eaafb2e4f828da515c60ad96407ef9b5ee89c74f | |
parent | c8f49b77aa1bd2d636edec1f6d25a79194b3fa6e (diff) |
lamp: fix mysql utf8 collation
-rw-r--r-- | bin/ncp/CONFIG/nc-init.sh | 2 | ||||
-rw-r--r-- | bin/ncp/CONFIG/nc-nextcloud.sh | 2 | ||||
-rw-r--r-- | install.sh | 1 | ||||
-rw-r--r-- | lamp.sh | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/bin/ncp/CONFIG/nc-init.sh b/bin/ncp/CONFIG/nc-init.sh index 64c85c67..78fa05e9 100644 --- a/bin/ncp/CONFIG/nc-init.sh +++ b/bin/ncp/CONFIG/nc-init.sh @@ -43,7 +43,7 @@ configure() DROP DATABASE IF EXISTS nextcloud; CREATE DATABASE nextcloud CHARACTER SET utf8mb4 - COLLATE utf8mb4_unicode_ci; + COLLATE utf8mb4_general_ci; GRANT USAGE ON *.* TO '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD'; DROP USER '$DBADMIN'@'localhost'; CREATE USER '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD'; diff --git a/bin/ncp/CONFIG/nc-nextcloud.sh b/bin/ncp/CONFIG/nc-nextcloud.sh index 960e5a4b..2fd49e60 100644 --- a/bin/ncp/CONFIG/nc-nextcloud.sh +++ b/bin/ncp/CONFIG/nc-nextcloud.sh @@ -162,7 +162,7 @@ configure() DROP DATABASE IF EXISTS nextcloud; CREATE DATABASE nextcloud CHARACTER SET utf8mb4 - COLLATE utf8mb4_unicode_ci; + COLLATE utf8mb4_general_ci; GRANT USAGE ON *.* TO '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD'; DROP USER '$DBADMIN'@'localhost'; CREATE USER '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD'; @@ -52,6 +52,7 @@ cp etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/ install_app lamp.sh install_app bin/ncp/CONFIG/nc-nextcloud.sh run_app_unsafe bin/ncp/CONFIG/nc-nextcloud.sh +systemctl restart mysqld # TODO this shouldn't be necessary, but somehow it's needed in Debian 9.6. Fixme install_app ncp.sh run_app_unsafe bin/ncp/CONFIG/nc-init.sh bash /usr/local/bin/ncp-provisioning.sh @@ -127,8 +127,8 @@ EOF $APTINSTALL ssl-cert # self signed snakeoil certs # configure MariaDB ( UTF8 4 byte support ) - cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/90-ncp.cnf - sed -i '/\[mysqld\]/ainnodb_large_prefix=on' /etc/mysql/mariadb.conf.d/90-ncp.cnf + cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/90-ncp.cnf + sed -i '/\[mysqld\]/ainnodb_large_prefix=true' /etc/mysql/mariadb.conf.d/90-ncp.cnf sed -i '/\[mysqld\]/ainnodb_file_per_table=1' /etc/mysql/mariadb.conf.d/90-ncp.cnf sed -i '/\[mysqld\]/ainnodb_file_format=barracuda' /etc/mysql/mariadb.conf.d/90-ncp.cnf |