MySQL not starting after upgrade to version 10.2.31-3.25.1

This document (000015903) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP4
SUSE Linux Enterprise Server 12 SP5
 

Situation

After upgrading MySQL package to version 10.2.31-3.25.1, following error message might appear:
mysql-systemd-helper[39097]: Creating MySQL privilege database...
mysql-systemd-helper[39097]: mkdir: cannot create directory ‘/home/mysql’: Read-only file system
mysql-systemd-helper[39097]: Fatal error Can't create database directory '/home/mysql'
mysql-systemd-helper[39097]: The latest information about mysql_install_db is available at
mysql-systemd-helper[39097]: https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
mysql-systemd-helper[39097]: Creation of MySQL databse in /home/mysql failed
systemd[1]: mariadb.service: Control process exited, code=exited status=1
systemd[1]: Failed to start MySQL server.
systemd[1]: mariadb.service: Unit entered failed state.
systemd[1]: mariadb.service: Failed with result 'exit-code'.

Resolution

Modify /usr/lib/systemd/system/mariadb.service changing this:

ProtectHome=true

to this:

ProtectHome=false

Restart systemd daemon with
 
systemctl daemon-reload

Cause

New version of MySQL contains a couple of new features:
- ProtectSystem=full (prevent writes to /usr, /etc and etc)
- ProtectHome=true (prevent accessing /home, /root/, /run/user)
- PremissionsStartOnly=true (only pre/post scripts are run as root)

Status

Reported to Engineering

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000015903
  • Creation Date: 03-Mar-2020
  • Modified Date:10-Aug-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center