init script test db with wrong credential

Bug #1439673 reported by emilio brambilla on 2015-04-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to
Status tracked in 5.6
Raghavendra D Prabhu
Fix Released
Raghavendra D Prabhu

Bug Description

on percona-xtradb-cluster-server-5.6 /etc/init.d/mysql init script the db status test has hardcoded username and password:

mysql -u root -pabcd -e 'select 1;' 2>&1 | grep 'ERROR 2002'

I know it is not necessary to have a working account to check for "ERROR 2002" (cannot connect), but this abcd password is very dirty and logs a warning on mysql logs: "Access denied for user 'root'@'localhost' (using password: YES)"

Yes, it can be replaced with mysqladmin ping (which should work even with wrong creds).

Confirmed with PXC 5.5.41 and 5.6.22. It seems, this issue is only with deb packages.

mysqld_status () {
    mysqld_pid=$(cat $pid_file 2>/dev/null)

    if [ ! $mysqld_pid ];then
        echo "MySQL PID not found, pid_file detected/guessed: $pid_file" | $ERR_LOGGER
        if [ "$1" = "check_dead" ]; then
            return 0
        return 1


    soutput=$(mysql -u root -pabcd -e 'select 1;' 2>&1 | grep 'ERROR 2002')
    [ "$soutput" ] && ping_alive=0

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers