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

"CHANGE MASTER TO" truncates master password to 32 characters

    XMLWordPrintable

Details

    Description

      Setup

      On master:

      CREATE USER 'replication_user'@'%' IDENTIFIED BY 'c2Z3UBzHXWQOhCsW5w21f9AmILacxyM2dyGiBuagTKSzycbHesCtwANLhdNH5NON7RvumausDlLLiQ6m';
      GRANT REPLICATION SLAVE ON *.* TO 'replication_user'@'%';
      FLUSH PRIVILEGES;
      

      On slave:

      STOP SLAVE;
      CHANGE MASTER TO
        MASTER_USER='replication_user',  MASTER_PASSWORD='c2Z3UBzHXWQOhCsW5w21f9AmILacxyM2dyGiBuagTKSzycbHesCtwANLhdNH5NON7RvumausDlLLiQ6';
      START SLAVE;
      

      After this, the replication is working.

      Problem

      To produce the isse, restart the server:

      sudo service mariadb restart

      Now, "SHOW SLAVE STATUS \G" shows:
      ...
      Last_IO_Error: error connecting to master 'replication_user@molde.fire.smil:3306' - retry-time: 10 maximum-retries: 100000 message: Access denied for user 'replication_user'@'fdb6:6d27:be73:4::65' (using password: YES)
      ...

      Reason:

      sudo strings /var/lib/mysql/master.info
      ...
      replication_user
      c2Z3UBzHXWQOhCsW5w21f9AmILacxyM2dyGiBuagT
      ...

      => The password has been truncated to 32 characters when stored in master.info. A restart of the server retrieves the truncated password, which obviously does not work.

      Work-around

      Using a 32-character password. This weakens security!

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            GrCDaeQn3CgP6xjn35Uyzv5OCijfEpDm63FiOHKo1NH4n8ssFW9inlxVE6DkTs2v Thomas Dreibholz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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