Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-72389

Reusing a mysql database user on a new database caused Jira setup to fail with Database is not empty message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 9.0.0
    • 8.13.6, 8.16.1
    • Installation

      Issue Summary

      When doing a Jira vanilla install using mysql, if we do use an user already used by another database, Jira setup fails with the error:

      You have specified a database that is not empty, please specify an empty database. If you want to upgrade an existing installation, please follow these instructions instead.

      Steps to Reproduce

      • new install of Jira 8.16/8.13.6,mysql-connector-java-8.0.22.jar
        jira-home folder created
      • create a new database: CREATE DATABASE jiradb816 CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
      • get a database user created earlier and used by another Jira Database and just grant access to this new DB: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb816.* TO 'jiradbuser'@'localhost';
      • start Jira. It will land at the setup mode
      • Select your own install and database
      • Fill with the new Database created jiradb816 and the user jiradbuser and hit the test connection button

      Expected Results

      • test successful, we are able to proceed with the install

      Actual Results

      • Test fails with the error message and we can not hit next.

        You have specified a database that is not empty, please specify an empty database. If you want to upgrade an existing installation, please follow these instructions instead.

      Workaround

      • Delete all content of Jira home folder
      • Drop DB, create new user, create new DB, and grant access:
        drop database jiradb816;
        create user 'jira-816'@'localhost' IDENTIFIED BY 'jira-816';
        CREATE DATABASE jiradb816 CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
        GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb816.* TO 'jira-816'@'localhost';
        flush privileges;
        

              mrydzewski Mikolaj Rydzewski (Inactive)
              imurakami@atlassian.com Murakami
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: