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

MySQL Users Break when Migrating from MySQL 5.1 to MariaDB 10.0.10

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.10
    • 10.0.12
    • None
    • None

    Description

      I had MySQL installed and running. I created some users using HeidiSQL, a Windows MySQL GUI and verified that they worked. I then upgraded to MariaDB.

      Only my root accounts worked on MariaDB. When I checked the mysql.user table, the root accounts had empty `plugin` fields, but the non-root accounts had mysql_native_password in the field. Emptying the field and restarting the server (probably flushing privileges would have worked) resolved the issue.

      I am not sure what was in the field prior to the MariaDB migration, but after checking all the other servers I have that are running vanilla MySQL, it was probably blank. I use HeidiSQL to create all of those users and none of them have a populated plugin field .

      Attachments

        Activity

          FWIW - We've seen this upgrading from MySQL 5.6.13 to MariaDB 10.0.10. We've had to clear the plugin field for all rows in user table and FLUSH PRIVILEGES.

          cf-services-eng Pivotal CloudFoundry Services Team (Inactive) added a comment - FWIW - We've seen this upgrading from MySQL 5.6.13 to MariaDB 10.0.10. We've had to clear the plugin field for all rows in user table and FLUSH PRIVILEGES.
          metateck Clifford Keeney added a comment - - edited

          I'm feeling a little bad that this bug report is getting so much attention when I feel it was most likely just caused by my failure to run mysql_upgrade. cf-services-eng did you guys run mysql_upgrade when you encountered the issue?

          metateck Clifford Keeney added a comment - - edited I'm feeling a little bad that this bug report is getting so much attention when I feel it was most likely just caused by my failure to run mysql_upgrade. cf-services-eng did you guys run mysql_upgrade when you encountered the issue?

          This bug report is, basically, about MariaDB not allowing a user to connect, when the corresponding row in the mysql.user table has password and plugin fields set, but authentication_string empty.

          The original logic (still preserved in MariaDB) was simple: if the plugin field is not set (meaning old table), the server looks at the password field and implicitly uses mysql_native_password plugin. If the plugin field is set (new way, pluggable-auth compatible), the server uses plugin and authentication_string pair, and ignores the password field (the password is stored in the authentication_string).

          Now, it looks like Oracle broke this, in MySQL 5.6, plugin field contains "mysql_native_password", password is set, authentication_string is empty. In this case, MySQL 5.6 uses old style field password and a new style field plugin, but ignored new style field authentication_string. There's no logic in that.

          Still wonder, what we should do about this issue...

          serg Sergei Golubchik added a comment - This bug report is, basically, about MariaDB not allowing a user to connect, when the corresponding row in the mysql.user table has password and plugin fields set, but authentication_string empty. The original logic (still preserved in MariaDB) was simple: if the plugin field is not set (meaning old table), the server looks at the password field and implicitly uses mysql_native_password plugin. If the plugin field is set (new way, pluggable-auth compatible), the server uses plugin and authentication_string pair, and ignores the password field (the password is stored in the authentication_string ). Now, it looks like Oracle broke this, in MySQL 5.6, plugin field contains "mysql_native_password", password is set, authentication_string is empty. In this case, MySQL 5.6 uses old style field password and a new style field plugin , but ignored new style field authentication_string . There's no logic in that. Still wonder, what we should do about this issue...

          Hi metateck,

          We did try mysql_upgrade but that did not fix. I believe our issue is exactly what is described by serg above.

          cf-services-eng Pivotal CloudFoundry Services Team (Inactive) added a comment - Hi metateck , We did try mysql_upgrade but that did not fix. I believe our issue is exactly what is described by serg above.

          Thanks for the clarification. I didn't have a full understanding of the behavior I was experiencing but it does sound like a real bug to me now.

          metateck Clifford Keeney added a comment - Thanks for the clarification. I didn't have a full understanding of the behavior I was experiencing but it does sound like a real bug to me now.

          People

            serg Sergei Golubchik
            metateck Clifford Keeney
            Votes:
            0 Vote for this issue
            Watchers:
            7 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.