Skip to content
Permalink
Browse files

set MariaDB 10.1 ProtectHome=false for CentOS 7 systemd in 123.09beta01

MariaDB 10.1.16 introduced ProtectHome=true setting which prevents Centmin Mod MariaDB 10.1 to restart due to custom tmpdir=/home/mysqltmp in /etc/my.cnf. This is a workaround for it as outlined at https://community.centminmod.com/posts/33688/. Just update to latest Centmin Mod 123.09beta01 via centmin.sh menu option 23 and re-run centmin.sh one time to setup /etc/systemd/system/mariadb.service.d/protecthome.conf with contents of

[CODEB]
[Service]
ProtectHome=false
[/CODEB]
  • Loading branch information...
centminmod committed Jul 19, 2016
1 parent 562247e commit 7b5947373d4b5fbc207de289e9c6c9d326304772
Showing with 29 additions and 0 deletions.
  1. +15 −0 inc/cpcheck.inc
  2. +2 −0 inc/mariadb_submenu.inc
  3. +12 −0 inc/mysqltmp.inc
@@ -1,3 +1,17 @@
c7mariadb_tmpdir() {
# fix for mariadb 10.1.16 introduced ProtecHome=true setting
# https://jira.mariadb.org/browse/MDEV-10399
if [[ "$CENTOS_SEVEN" = '7' && ! -f /etc/systemd/system/mariadb.service.d/protecthome.conf ]]; then
echo "Update MariaDB 10 setting for ProtectHome=false"
cat > "/etc/systemd/system/mariadb.service.d/protecthome.conf" <<TDF
[Service]
ProtectHome=false
TDF
systemctl daemon-reload
systemctl restart mysql
fi
}

fixphpfpm_includes() {
# in line with https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/
if [ -d /usr/local/nginx/conf ]; then
@@ -1044,6 +1058,7 @@ pathfixes
apache_protect
if [[ "$INITIALINSTALL" != [yY] ]]; then
c7mariadb_tmpdir
yumfastmirror_check
axelcheck
fileperm_fixes
@@ -93,6 +93,7 @@ MARIADBVERCHECK=`rpm -qa | grep MariaDB-server | awk -F "-" '{print $3}' | cut -
if [[ "$ENABLE_MARIADBTENUPGRADE" = [nN] ]]; then
echo "Place holder for now until MariaDB 10.x is ready to be added"
else
c7tmpsetup
mariadbtenpgrade
fi
fi
@@ -135,6 +136,7 @@ MARIADBVERCHECK=`rpm -qa | grep MariaDB-server | awk -F "-" '{print $3}' | cut -
echo "Place holder for now until MariaDB 10.1.x is ready to be added"
else
# echo "Place holder for now until MariaDB 10.1.x is ready to be added"
c7tmpsetup
mariadbtentotenoneupgrade
fi
fi
@@ -1,3 +1,14 @@
c7tmpsetup() {
if [[ "$CENTOS_SEVEN" = '7' && ! -f /etc/systemd/system/mariadb.service.d/protecthome.conf ]]; then
echo "Update MariaDB 10 setting for ProtectHome=false"
cat > "/etc/systemd/system/mariadb.service.d/protecthome.conf" <<TDF
[Service]
ProtectHome=false
TDF
systemctl daemon-reload
fi
}

mysqltmpdir() {

if [[ "$INITIALINSTALL" = [yY] ]]; then
@@ -12,4 +23,5 @@ if [ -d "/home/mysqltmp" ]; then
fi
fi

c7tmpsetup
}

0 comments on commit 7b59473

Please sign in to comment.
You can’t perform that action at this time.