MySQL Forums
Forum List  »  Install & Repo

Re: unable to start mysqld.service but command line works
Posted by: Daniel Fischer
Date: October 10, 2024 01:12AM

Hi,

If you've ever installed MySQL from the Fedora repository (the distribution's repository, not our repository with packages for Fedora), you might have the mysql-selinux package installed, even if you installed another version of MySQL from somewhere else later. If selinux is enabled on your system, this has the effect of restricting mysqld's file system access to only those paths that the default Fedora-provided MySQL is intended to use. This would prevent it from accessing /usr/local/mysql/data when running as a service as the Fedora-provided MySQL uses a different location for the data directory.

You can find out if selinux is enabled by running the "sestatus" command.
There might also be messages in /var/log/messages that mention "audit" and "mysqld".

To find out whether selinux is the only problem, you could temporarily disable it by running "setenforce 0" as root; if the service can start after doing that, the problem is selinux.

If the mysql-selinux package is installed, then uninstalling it and rebooting might help.


Danny

--
Daniel Fischer, MySQL Release Engineering
Oracle Corporation, http://oss.oracle.com/

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.