Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-716

Access Denied: User without global privileges on a schema but with grants only on some tables can't connect if the default schema is specified in the connection string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 2.0.0
    • N/A
    • None

    Description

      If a user has only privileges on some objects/tables of a schema, he can't connect by specifying such schema as default schema for the connection:
      If the schema is not specified, it can connect regularly.

      MySQL [(none)]> show grants for 'pippo'@'%';
      ------------------------------------------------------------------------------------------------------

      Grants for pippo@%

      ------------------------------------------------------------------------------------------------------

      GRANT ALL PRIVILEGES ON `db3`.`a` TO 'pippo'@'%'

      Schema specified:

      $ mysql -upippo -p123 -h127.0.0.1 -P4006 db3
      ERROR 1045 (28000): Access denied for user 'pippo'@'127.0.0.1' (using password: YES) to database 'db3'

      No schema specified:

      $ mysql -upippo -p123 -h127.0.0.1 -P4006
      Welcome to the MariaDB monitor. Commands end with ; or \g.
      Your MySQL connection id is 2485
      Server version: 10.0.0 1.4.3-maxscale MariaDB Server, wsrep_25.13.raf7f02e

      Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

      MySQL [(none)]>

      Attachments

        Activity

          People

            markus makela markus makela
            claudio.nanni Claudio Nanni
            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.