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

mariadb-upgrade does not consider O/S user as other utilities

    XMLWordPrintable

    Details

      Description

      The Utility mariadb-upgrade does not consider the O/S user as for example mariadb does. This becomes problematic when running as admin user other than root (for example mysql) because also this user is auth_socket authenticated:

      mysql@boss:~ [ma105down, 3306]> id
      uid=1001(mysql) gid=1001(mysql) groups=1001(mysql),15(kmem)
       
      mysql@boss:~ [ma105down, 3306]> mariadb --help | grep user
      user                              (No default value)
       
      mysql@boss:~ [ma105down, 3306]> mariadb-upgrade --help | grep user
      user                              root
       
      mysql@boss:~ [ma105down, 3306]> mysql
      mysql@localhost [(none)]> select current_user();
      +-----------------+
      | current_user()  |
      +-----------------+
      | mysql@localhost |
      +-----------------+
       
      mysql@boss:~ [ma105down, 3306]> mariadb-upgrade 
      Version check failed. Got the following error when calling the 'mysql' command line client
      *ERROR 1698 (28000): Access denied for user 'root'@'localhost'*
      FATAL ERROR: Upgrade failed
      

      Unwanted work-around:

      mysql@boss:~ [ma105down, 3306]> mariadb-upgrade -umysql
      Phase 1/7: Checking and upgrading mysql database
      Processing databases
      mysql
      mysql.column_stats                                 OK
      ...
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              oli Oli Sennhauser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration