Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA complaining of non empty database and then not creating all tables in DB

Hi all,

I'm dipping into the world of Atlassian and am experiencing some issues.

My setup is as follows: JIRA 8.12.1 Server, MySQL 8, Confluence 7.7.3 (will also be installing Bitbucket and Bamboo at a later stage).

My issue as follows:

I've setup MySQL 8 and got that up and running and managed to also get Confluence installed and running - so I know that the DB is working okay.

I then installed JIRA, and was running through the setup for connecting with my own database, but, when I enter all the details and test my connection, it's telling me that I am trying to connect to a non empty database which is not correct as it was just created moments before.

Error message reads "You have specified a database that is not empty, please specify an empty database."

Then, I try and go the route of using a dbconfig.xml file and we get past the database setup stage when I restart the JIRA service. When I try to add my license, it errors out again as the cwd_application table was not created (according to the logs) - it seems as though quite a few tables were not created (error snippet below).

Caused by: java.sql.SQLSyntaxErrorException: Table 'jiradb.cwd_application' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException( [mysql-connector-java-8.0.21.jar:8.0.21]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException( [mysql-connector-java-8.0.21.jar:8.0.21]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException( [mysql-connector-java-8.0.21.jar:8.0.21]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal( [mysql-connector-java-8.0.21.jar:8.0.21]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery( [mysql-connector-java-8.0.21.jar:8.0.21]
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery( [commons-dbcp2-2.1.jar:2.1]
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery( [commons-dbcp2-2.1.jar:2.1]
at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeQuery( [classes/:?]
at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeQuery$5( [classes/:?]
at com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime( [atlassian-diagnostics-platform-1.1.10.jar:?]
at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime( [classes/:?]
at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeQuery( [classes/:?]
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery( [entityengine-1.5.0.jar:?]
... 315 more
, referer=http://localhost:8080/secure/SetupLicense!default.jspa, servletErrorMessage=}

After having an easy time setting Confluence up, I'm a little confused as to why JIRA is causing me such grief.

I've looked at the compatibility charts and according to them, JIRA 8.12 should work with MySQL 8.

Any tips or pointers in getting this up and running would be very much appreciated.



4 answers

1 accepted

0 votes
Answer accepted

If you're going via dbconfig to connect it to a database that Jira has already said is not empty, then it's not going to work - there's a reason it's complaining about a non-empty database in the installer and just bypassing the check is not solving the problem.

I would be interested to see what is actually in the current database that triggered the "database has data already message, but my instinct is to start again. 

Create a completely new database (although you could reuse the old name by simply using "drop database", I wouldn't want to do that until I knew what had been putting data into it that stopped Jira installing)

Then run the installer again, pointing to the new should-be-empty database.  Bear in mind that the second you get past the "configure database" step, Jira will be adding tables, so if you stop the installation at any point after that, you'll need to clean out the target database and start yet again.

Hi Nic,

After too-ing and fro-ing for a bit (dropping the database and recreating a few times) I decided to bite the bullet and uninstall and re-install everything. This time JIRA was the first Atlassian application I installed and lo and behold it worked!

I don't understand why it didn't work the first time as the database was definitely empty as I created it just before trying to attach JIRA to it, exactly the same way I did it when it worked just now.

Either way, a re-install did the trick.

Now to see if the other Atlassian products will play nice.



0 votes

Same Problem

I am experiencing a similar issue. I am following the Here Be Dragons instructions on a fresh Windows install. The database did not exist before I created it exactly as described in the instructions. I get this error: "You have specified a database that is not empty, please specify an empty database. "

It would be interesting to see what tables are in the database that are triggering this problem.

Yes it would! Can you tell me how to figure that out?

I'd log into the database with the command-line tool for it, and start with "show tables" or equivalent.

I don't know what database you might be using or what connection options you have for it, so I have to be a bit vague here.

Same issue here. Debian Buster running mysql 8. Confluence installed without issue and is running. When I try to setup Jira, I create a database jiradb. A show tables command in mysql says Empty set (0.00 sec). No tables, no data, absolutely nothing. I too have tried numerous versions of the JDBC connector, still no luck. Any thoughts appreciated.

same issue on Ubuntu 20.04

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,073 views 8 28
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you