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

mariadb-secure-installation inform about test_ databases

    XMLWordPrintable

Details

    Description

      Currently mariadb-secure-installation mentions the test db and offers to remove it but does not mention eg test_electricity database permissions.

      echo "By default, MariaDB comes with a database named 'test' that anyone can"
      echo "access.  This is also intended only for testing, and should be removed"
      echo "before moving into a production environment."
      echo
      [...]
          echo $echo_n "Remove test database and access to it? [Y/n] $echo_c"
      

      Suggest:

      echo "By default, MariaDB comes with a database named 'test' that anyone can"
      echo "access.  This is also intended only for testing, and should be removed"
      echo "before moving into a production environment."
      echo "These privileges extend to any database named with the 'test_' prefix."
      echo
      

      Also don't drop valid user created create grants:

          do_query "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
      

          do_query "DELETE FROM mysql.db WHERE user='' and (Db='test' OR Db='test\\_%')"
      

      This will let the user keep such grants as:

      grant all on `test_%`.* to 'testenv'@'localhost';
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mg MG
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.