Database is not Empty issue

Nagaveer November 19, 2013

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.

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
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2013

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)

Nagaveer November 19, 2013

Thanks for quick reply Nic,

please tell me how to create new database in HSQLDB

Or drop all the tables in existing database?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2013

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.

Stefan Dangl December 15, 2014

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!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2014

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?

Stefan Dangl December 15, 2014

Ok, that worked. Thank you!

Frank Gutierrez-Robles June 14, 2016

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2016

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.

0 votes
Nagaveer November 19, 2013

Thanks Nic,

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

Rahul Aich [Nagra]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2013
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2013

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