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

Secure installation with normal user fails to accept empty root password

    XMLWordPrintable

Details

    Description

      When installing MariaDB as a normal user, mysql_secure_installation fails when attempting to authenticate the root user (with an empty password).

      This can be worked around by updating the make_config function to avoid writing the user and password lines if the provided root password is empty, as in the following alternate implementation (first if-statement added):

      make_config() {
          echo "# mysql_secure_installation config file" >$config
          echo "[mysql]" >>$config
          if [ ! -z "$rootpass" ]; then
              echo "user=root" >>$config
              esc_pass=`basic_single_escape "$rootpass"`
              echo "password='$esc_pass'" >>$config
          fi
          #sed 's,^,> ,' < $config  # Debugging
       
          if test -n "$defaults_file"
          then
              dfile=`parse_arg "$defaults_file"`
              cat "$dfile" >>$config
          fi
      }
      

      I'm not sure if this is the proper fix, but hopefully it at least highlights where the conflict is happening.

      Attachments

        Issue Links

          Activity

            People

              anel Anel Husakovic
              groot-verde Andrew Groot
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.