Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18861

mysqladmin ping -u root -pmypassword returns successfully, even if the login fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.4.3
    • N/A
    • None
    • official MariaDB docker image mariadb:10.4.3

    Description

      I wanted to use mysqladmin ping to perform a livenesscheck. I'm using the root user with an assigned password, thus the command:

      mysqladmin -r root -pmypassword ping
      echo $?

      If login fails, the command writes an error message to the error stream - but the return value of the failed function is "0" although it should be "1" ($? retrieves the return value of the last executed command).
      If you do this check with status instead of ping, the return value is "1", if login fails.

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            tocosonic Michael Hinkel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.