JIRA needs to store its data in a database. For this, we will set up a MySQL database. JIRA 7 requires MySQL 5.1 up until 5.6 to run smoothly. You should refer to the preferred MySQL server configurations as described on the following page: https://confluence.atlassian.com/jira/connecting-jira-to-mysql-185729489.html.
It's also possible to use PostgreSQL, Oracle, or Microsoft SQL Server with JIRA, but here we will discuss how to set up the MySQL database:
Log in to your MySQL Server with the following command:
mysql -u root -p
Enter the password.
Create a new database to be used by JIRA using the following command:
Create database jiradb character set utf8 COLLATE utf8_bin;
Create a new user and give it permissions on the database:
GRANT SELECT,INSERT, UPDATE,DELETE,DROP,CREATE,ALTER, INDEX on jiradb.* TO 'jirauser'@'localhost' IDENTIFIED BY 'password';
Flush the privileges using the following command:
We have created a MySQL database name as
jiradb, a database username as
jirauser, and a database password as
password. Keep this information on hand because we will need it when we set up JIRA.
To use MySQL with JIRA, you need to download a
mysql-connector-java-5.1.32-bin.jar database driver and copy it to the
lib folder under JIRA's installation directory. The driver can be downloaded from http://dev.mysql.com/downloads/connector/j.