1. Configure MySQL
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
1.
Create a database user which JIRA will connect as (e.g.
jirauser
).
2.
Create a database for JIRA to store issues in (e.g.
jiradb
).
The database must have a character set of UTF8. Enter the following command from within the MySQL command client:
create database jiradb character set utf8;
(if you want your database to be named
jiradb
).
3.
Ensure that the user has permission to connect to the database, and create and populate tables.
2. Copy the MySQL driver to your application server
1.
Download the MySQL Connector/J JDBC driver, eg. version 3.1.12 (tar.gz or zip) which we have verified to work. NOTE: the older 3.1.11 driver is broken.
2.
Add the MySQL JDBC driver jar (
mysql-connector-java-3.x.x-bin.jar
) to the
common/lib/
directory. NOTE: Do not place the Debug Driver (
mysql-connector-java-3.x.x-bin-g.jar
) on the
CLASSPATH
as this can cause issues (JRA-8674).
3.
Configure your application server to connect to MySQL
1.
Edit
conf/server.xml
(if you are using JIRA Standalone) and customise the
username
,
password
,
driverClassName
and
url
parameters for the Datasource. (If you are using JIRA WAR/EAR, edit the appropriate file on your application server; e.g. for Tomcat, edit
conf/Catalina/localhost/jira.xml
.)
4.
Configure the JIRA Entity Engine
Edit
atlassian-jira/WEB-INF/classes/entityengine.xml
(if you are using JIRA Standalone) or
edit-webapp/WEB-INF/classes/entityengine.xml
(JIRA WAR/EAR), and change the
field-type-name
attribute to
mysql
. (If you forget to do this and start JIRA, it may create database tables incorrectly. See this page if this happens to you.) Also delete the
schema-name="PUBLIC"
attribute, if it exists
转载于:https://blog.51cto.com/yuhaijunll/107791