Database is not Empty issue

Before I was using JIRA 6.0. Now I installed JIRA 5.2.9. While Configuring database for the first time, I'm getting error.


You have specified a database that is not empty, please specify an empty database.

Before I was using MYSQL DB, now I want to configure with HSQLDB.

please help me

2 answers

1 accepted

1 vote
Accepted answer

The fix is in the error message. It expects you to provide it an empty database. Create a new empty database for it and tell it that one instead of the one that already exists.

Or drop all the tables in the existing one if you really don't need it (of course, backup first, if there's anything you might need)

(Additionally, don't use HSQLDB if you are creating a production system. It's only suitable for dev/test and other systems where complete loss of all the data is not a worry)

Thanks for quick reply Nic,

please tell me how to create new database in HSQLDB

Or drop all the tables in existing database?

In HSQLDB, you can simply delete the files that lie behind it and it'll be recreated. But as you've got MySQL working and connected, I'd stick with that.

There's no easy way to drop all the tables in a MySQL database. I wouldn't bother though, I'd create a new empty one and tell Jira to use that.

What about users who want to go back to an existing HSQLDB. In our case, we tried to migrate to mySQL resulting in excessive data-loss. Going back to HSQLDB could save us a lot of time!

You just undo the changes in the database config file that swapped you from hsql to mysql. It'll start reading the files that you left behind (if you've got data in mysql, that's a whole different question probably, because you're getting into extract, merge, update etc - the swap back to hsql really is "go back to where I turned it off") That is only a temporary change right? You're not thinking of using HSQL for actual data in the long run?

Ok, that worked. Thank you!

I did an in place migration of JIRA 6.4 to JIRA 7.0 and now there isn't anything in Jira, and when I point to the JIRA DB from the previous version it give me that database error, how can I upgrade from JIRA 6.4 to 7.0?

Something went wrong, as before.  You'll need to work out what it is, fix it and then try again.  There's no way we can know what you've run into, we have no information on what you've done.

Thanks Nic,

Now I want to configure with HSQLDB, Can you please What are the files I need to delete?

There's a couple of files called something like "database.script" and "database.log" in the home directory. You'll need to delete the one that appears to contain nothing but SQL statements.

You'll also need to reconfigure your Jira to read HSQLDB, start with a look in dbconfig.xml

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,249 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you