Now you will create a database where the Atlassian JIRA application will store its data, and a user role that JIRA will use to connect to the database. We are assuming that you have already created your PostgreSQL database server in a previous step.

(info) We are using pgAdmin III (version 8.4.x) the administration user interface supplied with PostgreSQL. If you used the one-click installer when installing PostgreSQL, pgAdmin III will be already installed on your computer.

  1. Start pgAdmin III.
  2. Right-click (or double-click) the database server name and log in using the password that you specified for the 'postgres' super user.
  3. Add a new login role called 'jirauser':
    • Right-click Login Roles and select New Login Role.
    • Enter the role Role name: jirauser
    • Switch to the Definition tab and enter a Password and enter it again to confirm it.
    • Click the Role privileges tab.
    • Select Can create databases.
    • Select Can create roles.
    • Click OK to create the user.
  4. Add a new database called 'jira':
    • Right-click Databases and select New Database.
    • Enter the database Name: jira
    • Select the Owner: jirauser
    • Click OK to create the database.

Screenshot 1 (click to enlarge): JIRA database and user in PostgreSQL

 

 

For UNIX users, pgAdmin3 (version 8.4.x) is also available for installation on most Linux platforms. However, if you are on UNIX and do not have pgAdmin III, you can use the command line interface instead. Assuming that you are using the default installation directory of /opt/PostgreSQL/8.4/bin/, enter the following commands:

sudo -s -H -u postgres
# Create the JIRA user:
/opt/PostgreSQL/8.4/bin/createuser -S -d -r -P -E jirauser
# Create the JIRA database:
/opt/PostgreSQL/8.4/bin/createdb --owner jirauser --encoding utf8 jira
/q
  • No labels