Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Switching Jira DB

Hi,

     For a testing I tried to point my Dev Jira instance to another DB instance by changing the new db server parameters in dbconfig.xml Now when I tried to switch it back to my old db , Jira url loading to Setup Wizard. Anybody knows how I can avoid the Setup Wizard as my db still exists with old data.

3 answers

0 votes

Hey Anoop, 

As I recall, you do need to run through a portion of the setup wizard, but it will detect that there is already data in there and allow you to connect without overwriting.

 

Thanks, 

Kian

I have tried to proceed with setup wizard and I used my own database option, I gave my existing database credentials, but it not leting me to proceed. its throwing following message

"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. "

I tried to run .bin/config.sh also, and used the "Database Selection" option, but that also failed. Do you know how the setup wizard prompting due to which config or cache setting.

Thanks,

Anoop

0 votes

Hi Anoop,

You'll need to go through the normal setup and then use the JIRA Configuration utility.  Take a look at Using the JIRA application configuration tool for instructions on using this.

Cheers,

Branden

 I have tried to proceed with setup wizard and I used my own database option, I gave my existing database credentials, but it not leting me to proceed. its throwing following message 

"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. "

I tried to run .bin/config.sh also, and used the "Database Selection" option, but that also failed. Do you know how the setup wizard prompting due to which config or cache setting.

Thanks,

Anoop

Andy Heinzer Atlassian Team Mar 12, 2018

The initial setup wizard will not let you select an existing database that already has data in it.  It is not designed for that.

However you should be able to stop Jira and run the Jira Config tool as a means to change the database being used.  When you use this, it should be updating the $JIRAHOME/dbconfig.xml file.

This file is what determines how Jira will connect to your database on startup.

 

What happens when you try to change the settings in the config tool and then save these?  Do you see an error message there that the file cannot be saved?  It could be that the account you launched that config.sh file might not have the correct permissions to write/edit the file in that path.   But that is about the only reason I could understand as to why you changes might not be saved.

 

You can try to edit the dbconfig.xml file directly as a means to change this settings back.

Depending on your database type, you can see a sample dbconfig.xml file near the bottom or the respective links on Connecting Jira to a database.

 

Please note that after you have saved changes to the dbconfig.xml file, you will need to start Jira again in order to see those changes take effect.

Thanks for the update. But my dbconfig.xml file already existing the db credentials which I am trying to connect. Config.sh shows an error as "*** Connection failed: Could not connect to the DB: Login failed for user 'jiradbuser'. ClientConnectionId:61170270-425a-44f8-9a07-96f9f4f4e0a6" , but on the UI if I try to proceed the setup wizard with same login credentials, it prompting as db is not empty. Its not a DB connectivity issue. 

Andy Heinzer Atlassian Team Mar 13, 2018

If the connection test in the config utility tells you login failed, then the SQL login failed.   Simple as that.   That failure is more significant to me than the oddities to see in the setup wizard.  That part of the wizard is expecting to create a new database.

As I see it you have a few different troubleshooting options here:

  1. Try to change the password for this SQL user and then update the dbconfig with this new info.  It would also help to use the config.sh utility to test the database connection to confirm this works.  If you can get that test to pass, then Jira should be good when starting up with those settings.
  2. Create a new SQL user that has proper permissions for this database

    OR
  3. At this point it is probably better just to create a new blank database for Jira per the explicit instructions in Connecting Jira to a database , connect Jira to this database, start Jira, and then use the setup wizard to import an XML backup Jira made of that database.   Steps on doing this are in Migrating JIRA applications to another server.  Specifically if you go to section 3.6 of that guide it explains how you can import

I had exactly the same issue today. I actually didn't edit dbconfig.xml each time. Before I switched to the new DB I made a backup copy. When switching back I just renamed the files.

At the time Jira presented me the setup wizard, my directory listing looked like this:

-rw------- 1 jira root 1096 Apr 21 07:07 dbconfig-new.xml
-rw------- 1 root root 1097 Apr 21 07:03 dbconfig.xml

Solution:

  • Stop Jira
  • chown jira:root dbconfig.xml
  • Start Jira

It looks like my issue was a permission issue in the end.

Suggest an answer

Log in or Sign up to answer
TAGS

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