Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"database that is not empty" when trying to use azure managed postgres database

Deleted user April 16, 2018

Trying to install a fresh jira 7.9 fails on database setup with

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.

if the database is an azure postgres managed database.

The database _is_ empty.

What could be the issue ? Could it be that jira is assuming I am installing the datacenter version of jira for some reason ?

 

10 answers

5 votes
Simon Merrick
Contributor
February 19, 2019

I found this error in the logs which lead me to https://jira.atlassian.com/browse/JRASERVER-67274

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

The long and short of it is you need an older mysql-connector-java-5.1.x.jar driver instead of the latest mysql-connector-java-8.0.x.jar that the documentation would lead you to install.

Reverting my driver to mysql-connector-java-5.1.47.jar fixed the issue for me.

vinctzh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2019

My issue was fixed by changing mysql-connector-java to mysql-connector-java-5.1.48.jar

Gökhan Çöplüoğlu April 19, 2021

thanks it works!

3 votes
AlekseyArh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2019

По английски не говорю, напишу на русском, 21 век всё таки, у всех есть онлайн переводчики =)

Проблема была с mysql-connector

Я скачал два коннетора 8.0.15 и 5.1.47

После удаления 8.0.15 и перезапуска jira всё заработало.

rm /opt/atlassian/jira/lib/mysql-connector-java-8.0.15.jar

Vladimir December 29, 2020

да, есть такой косяк, не знаю чей или Oracle или Atlassian. Два jar-файла с разными именами, но одинаковые по назначению вместе не работают.

1 vote
KellyW
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 3, 2018

Hi Jean-Baptiste,

 

If there are tables found in the database instance, Jira will mark it as not empty.

 

If you confirm no other Jira instance(s) is referencing the same database instance, try dropping all the tables and restart the setup:

DROP SCHEMA public CASCADE;

(assuming public is the schema) 

 

Regards,
Kelly

0 votes
Jose Aguilera April 18, 2021

I had the same issue for a slightly different setup; I am using a MySQL 5.7.22 database in AWS RDS.

First, I made sure I had all the right parameters set (had to create a new parameters group based on the default one for MySQL 5.7, modified the values for the parameters as documented at https://confluence.atlassian.com/adminjiraserver0813/connecting-jira-applications-to-mysql-5-7-1027137456.html and then applied the parameters group to my AWS RDS MySQL instance). However, I was still getting the message about the database not being empty. I was using the connector mysql-connector-java-8.0.23; as soon as I changed to use mysql-connector-java-5.1.49, the issue was gone and I was able to proceed with the setup of the instance.

0 votes
Felix Lehner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2020

OK, I got it!

So I had the same Problem. My solution was to delete the extensions (pg_buffercache, pg_stat_statements) in my Postgres managed by Azure. Hope i can help someone.

Greetings Felix.

Hamzah Mohamed
Contributor
March 20, 2020

Thanks for the suggestion. No luck for me unfortunately.

0 votes
vinctzh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2019

Using mysql-connector-java-5.1.48.jar with Mysql 5.7 can lead to this issue. I fixed this by rolling back to mysql-connector-java-5.1.48.jar

0 votes
roloff
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2019

I had tables pg_buffercache and pg_stat_statements in my public schema.

So just created a new schema and give it a try.

CREATE SCHEMA jira;

0 votes
Simon Merrick
Contributor
February 19, 2019

Same here,

Keep hitting this problem when trying to setup a burner instance on Digital Ocean

  • Ubuntu 18.04.2 LTS
  • mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64)
  • Driver: mysql-connector-java-8.0.15.jar
  • Jira 7.13.1 installed from .bin installer

If I DROP DATABASE jiradb; then jira tells me that it can't find 'jiradb'

If I then CREATE DATABASE jiradb; then jira tells me the DB is not empty.

USE jiradb;
SHOW TABLES;

Returns empty set (0.0)seconds

0 votes
Jurgen Schober
Contributor
February 14, 2019

Same here. Any news on that? Create a new DB in MySQL but when I try to run the wizard it tells me "DB is not empty". But it sure is.

Simon Merrick
Contributor
March 14, 2019

Did you get this fixed?

0 votes
Joe Chlimoun December 21, 2018

Was there a resolution to this? I think I'm having the exact same issue, but it's jira 7.13, MySQL, and AWS.

Is there a document to manually set up the database schema to bypass this?

Joe Chlimoun December 21, 2018

And to make it more interesting, I tried restoring my original dbconfig.xml (H2), restarted JIRA, and it still goes through setup... now it won't move forward because my H2 database is not empty.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events