Join the community today
Become a Member

MariaDB MySQL Not Restarting After CentOS 7.4 Update Fix

Discussion in 'Centmin Mod News' started by eva2000, Sep 14, 2017.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    54,920
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    CentOS 7.4 was just released and seems it's preventing MariaDB MySQL from restarting on CentOS 7 based servers due to changed systemd level protections. The workaround fix for now is below.

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,920
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Updated permanent fix is editing /etc/systemd/system/mariadb.service.d/protecthome.conf to add ProtectSystem=false to the existing setting (ProtectHome=false) so it looks like below
    Code (Text):
    [Service]
    ProtectSystem=false
    ProtectHome=false
    

    Then restart MariaDB MySQL
    Code (Text):
    systemctl daemon-reload
    systemctl restart mariadb
    

    or
    Code (Text):
    mysqlrestart
    

    Previously, setting just ProtectHome=false was enough, but after CentOS 7.4 update, seems we need to add ProtectSystem=false. Not sure why it's needed as ProtectSystem isn't for /home anyway which is where tmpdir=/home/mysqltmp is set to.
    Code (Text):
    # Prevent writes to /usr, /boot, and /etc
    ProtectSystem=full
    

    From systemd.exec
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,920
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    8:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    MariaDB CentOS 7.4 Workaround Fix



    Updated both Centmin Mod 123.08stable and 123.09beta01 builds with permanent workaround fix for MariaDB MySQL server not restarting after CentOS 7.4 updates. The issue is CentOS 7.4 only issue and MariaDB 10.1 I believe as systemd protections didn't get added until MariaDB 10.1. So CentOS 6 and MariaDB 10.0.x users (123.08stable) would probably not experience the issue. Details here MariaDB MySQL Not Restarting After CentOS 7.4 Update Fix

    To update your Centmin Mod builds follow instructions at centminmod.com/upgrade.html and respective version threads below:
    After updating Centmin Mod, run centmin.sh one more time for fix to auto populate to /etc/systemd/system/mariadb.service.d/protecthome.conf which should now contain
    Code (Text):
    [Service]
    ProtectSystem=false
    ProtectHome=false
    

    When you re-run centmin.sh on updated code, you will get a one time message like below:
    Code (Text):
    ./centmin.sh 
    
    Update MariaDB 10 setting for ProtectSystem=false addition
    
     
    Last edited: Sep 14, 2017
Thread Status:
Not open for further replies.