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

LP #1721801: Mysqld_safe choose wrong MY_PWD

    Details

      Description

      **Reported in Launchpad by Marco Tusa last update 06-10-2017 17:01:31

      In upgrading from :
      Percona-XtraDB-Cluster-5.7.14-rel8-26.17.1.Linux.x86_64.ssl101
      to
      Percona-XtraDB-Cluster-5.7.19-rel17-29.22.1.Linux.x86_64.ssl101

      I had an issue and MySQL (PXC) did not start.
      [mysql@galera1h1n5 galera1]$ 2017-10-06T14:11:17.687995Z mysqld_safe Logging to '/opt/mysql_instances/galera1/mysql-3306.err'.
      2017-10-06T14:11:17.693932Z mysqld_safe Logging to '/opt/mysql_instances/galera1/mysql-3306.err'.
      2017-10-06T14:11:17.704538Z mysqld_safe The file /mnt/workspace/percona-xtradb-cluster-5.7-binary-tarball/label_exp/centos6-64/Percona-XtraDB-Cluster-5.7.19-29.22/371/usr/local/Percona-XtraDB-Cluster-5.7.19-rel17-29.22.1.Linux.x86_64.ssl101/bin/mysqld
      does not exist or is not executable. Please cd to the mysql installation
      directory and restart this script from there as follows:
      ./bin/mysqld_safe&
      See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

      I am currently running PXC using TAR binaries and NON standard location.

      Debugging a bit I found that mysqld_safe in the newest release is currently picking up the wrong path at line 579:
      case "$0" in
      580 /*)
      581 MY_PWD='/mnt/workspace/percona-xtradb-cluster-5.7-binary-tarball/label_exp/centos6-64/Percona-XtraDB-Cluster-5.7.19-29.22/371/usr/local/Percona-XtraDB -Cluster-5.7.19-rel17-29.22.1.Linux.x86_64.ssl101'
      582 ;;
      583 *)
      584 MY_PWD=`dirname $0`
      585 MY_PWD=`dirname $MY_PWD`
      586 ;;
      587 esac

      While the OLD version at line 531:
      530
      531 MY_PWD=`pwd`
      532 # Check for the directories we would expect from a binary release install
      533 if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
      534 then

      NEW execution (bash with -x)
      Cluster-5.7.19-rel17-29.22.1.Linux.x86_64.ssl101,,' -e 's,/,,' -e 's,,./,'
      + relpkgdata=./share
      + case "$0" in
      + MY_PWD=/mnt/workspace/percona-xtradb-cluster-5.7-binary-tarball/label_exp/centos6-64/Percona-XtraDB-Cluster-5.7.19-29.22/371/usr/local/Percona-XtraDB-Clust
      er-5.7.19-rel17-29.22.1.Linux.x86_64.ssl101
      + test -n '' -a -d ''

      OLD execution (bash -x)
      + relpkgdata=./share
      ++ pwd
      + MY_PWD=/opt/mysql_templates/PXC-57
      + test -n '' -a -d ''

      Commenting the new code and set the old assignment will make the mysqld_safe work correctly.
      But I assume you were trying to do something with that change.

        Smart Checklist

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated: