I installed JIRA using the standalone installer (not from the war distribution). As I understand it the standalone version installs a database and all deps at once. Now I need to get access to that database but I dont know what the default db user and password and I am not sure how to connect to it. I have access to the machine running JIRA as root. Any ideas?
The accepted answer doesn't give actual instructions and the link has moved.
A more complete answer would have saved me time, so I'm adding a detailed answer just in case it helps someone else:
path/to/JIRA/HOME/database
jiradb.script
will be located in this directory so you can try just searching for that file. On Mac/Unix: find . -name "*jiradb.script"
path/to/JIRA/bin/stop-jira.sh
/lib
folder (i.e. path/to/JIRA/lib)java -cp lib/hsqldb-1.8.0.5.jar org.hsqldb.util.DatabaseManager -user sa -url jdbc:hsqldb:HOME/database/jiradb
cd
to that the root directory, first, which for me was something like /Users/mymachine/Downloads/atlassian-jira-6.4.9-standalone
jiradb
seen in the command above simply tells the DatabaseManager class which file prefix to use. The actual database lives in jiradb.script
If you don't have access to a graphical environment, such as on a headless Unix system, then step 3 above will not work. The command will complain that the DISPLAY variable is unset, or that it cannot connect to X11 instance.
Here's an alternate HSQLDB command, which will work in a non-graphical setting:
lib/sqltool.jar
, lib/hsqldb.jar
, and sample/sqltool.rc
, all of which you will need.Set up an rc file with an appropriate connection string (named jira in my example). The personal entry from the sample rc file is a good starting point: just change the filepath to the location of the jira database.
urlid jira
url jdbc:hsqldb:file:${user.home}/tmp/jiradb;shutdown=true
username SA
password
transio TRANSACTION_READ_COMMITTED
Run sqltool.jar
instead of hsqldb.jar
. You can now run SQL commands against this database
$ java -jar sqltool.jar jira
The DB that comes with JIRA is an HSQL DB. It can be accessed using an HSQL console. You can find instructions in JIRA's wiki. http://confluence.atlassian.com/display/JIRA/Running+SQL+commands+in+a+HSQL+database
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With