Bug #117992 Warn user when mysql already in LDAP user and/or group causing mysqld not to start at system init
Submitted: 15 Apr 18:04 Modified: 23 Apr 12:06
Reporter: Bill Adams Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Installing Severity:S4 (Feature request)
Version:mysql-community-server-8.4.5-1.el8.x86_6 OS:Red Hat (RHEL 8.10)
Assigned to: CPU Architecture:x86
Tags: /var/run/mysqld, LDAP, systemd-tmpfiles

[15 Apr 18:04] Bill Adams
Description:
* Installed mysql-community-server-8.4.5-1.el8.x86_64 from mysql-8.4-lts-community repo.
* mysql was in the LDAP passwd and group from someone else in this large organization.
* Apparently the mysql-community-server rpm skipped creating mysql in the local /etc/passwd and /etc/group because mysql was in LDAP.
* During system initialization systemd-tmpfiles apparently runs before LDAP client starts.
* When systemd-tmpfiles ran, mysql user and group were unknown, as reported in /var/log/messages.
* Therefore systemd-tmpfiles did not create /var/run/mysqld.

How to repeat:
* System uses LDAP or NIS for users and groups.
* Add mysql user and group to network user and group directories.
* Install mysql-community-server.
* Bring up mysqld normally.
* Reboot.
* mysqld fails to start.
* /var/run/mysqld is missing.
* Check /var/log/mysqld for errors about /var/run/mysqld.
* Check /var/log/messages for errors from systemd-tmpfiles about unknown mysql user.

Suggested fix:
During installation of mysql-community-server, at least show a warning that:
1. mysql user/or group were not created.
2. mysql is in network passwd or group directory.
3. mysqld will not start during system initialization unless mysql is in local /etc/passwd and /etc/group.
[23 Apr 12:05] MySQL Verification Team
Hi,

I will file this under Enhancement Request but basically this is a part of sysadmin work. Sysadmin should know about this and should configure dependencies accordingly getting ldap up before everything that depends on it.