Want to subscribe to topics you're interested in?
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

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    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.
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 4
  3. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:48 AM
    Nginx 1.13.x
    MariaDB 5.5

    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
    • Like Like x 8
Thread Status:
Not open for further replies.