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

Missing username in error 1044 Access denied for user ''@'localhost'

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.1.21
    • N/A
    • Server
    • None

    Description

      When a connection is made to a database with (1) a non-existent user, (2) an empty password, and (3) the database allows access for the user with an empty name, the error message changes from 1045 to 1044 and is missing the username.

      Reproducible on Windows and Linux.

      This leads to a lot of wasted time and confusion regarding the username setting.

      Without the user ''@'localhost':

      >mysql -u user1234 mysql
      ERROR 1045 (28000): Access denied for user 'user1234'@'localhost' (using password: NO)
      

      Then add the user ''@'localhost' with no DB access rights:

      CREATE USER ''@'localhost';
      GRANT USAGE ON *.* TO ''@'localhost';
      FLUSH PRIVILEGES;
      

      >mysql -u user1234 mysql
      ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rustyx Ruslan Altynbaev
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.