Uploaded image for project: 'Percona XtraDB Cluster'
  1. Percona XtraDB Cluster
  2. PXC-1131

LP #1724811: mysqld-systemd error when MySQL error-log doesn't exist in Centos/RHEL7

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.7
    • Fix Version/s: 5.7.24-31.33
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Iwo last update 24-10-2017 06:45:21

      If MySQL error-log doesn't exist a MySQL restart will cause mysqld-systemd to throw an error:

      mysql-systemd[5691]: install: invalid user @MYSQLD_USER@

      There's an unreplaced variable @MYSQLD_USER@ in mysqld-systemd script:

      1. If log file is not specified it's put into datadir by default
        if [ ! -z $log ]; then
        if [ ! -e "$log" -a ! -h "$log" -a x$(dirname "$log") = "x/var/log" ]; then
        case $(basename "$log") in
        mysql*.log) install /dev/null -m0640 -o@MYSQLD_USER@ -g@MYSQLD_USER@ "$log" ;;
        *) ;;
        esac
        fi
        if [ -x /usr/sbin/restorecon ]; then
        [ -e "$log" ] && /usr/sbin/restorecon $log
        fi
        fi

      The problem occurs only in PXC 5.7 (I've tested it against 5.7.19-29.22.1.el7) on Centos/RHEL 7.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evgeniy.patlan Evgeniy Patlan
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour
                  1h