配置JIRA Standalone连接MySQL数据库
2008-10-24 14:26
1161 查看
[align=left]1. Configure MySQL[/align]
[align=left]1. Create a database user which JIRA will connect as (e.g. jirauser). [/align]
[align=left]2. Create a database for JIRA to store issues in (e.g. jiradb). [/align]
[align=left]The database must have a character set of UTF8. Enter the following command from within the MySQL command client: [/align]
[align=left]create database jiradb character set utf8;[/align]
[align=left](if you want your database to be named jiradb). [/align]
[align=left]3. Ensure that the user has permission to connect to the database, and create and populate tables. [/align]
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.
[align=left]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). [/align]
[align=left] [/align]
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
[align=left]1. Create a database user which JIRA will connect as (e.g. jirauser). [/align]
[align=left]2. Create a database for JIRA to store issues in (e.g. jiradb). [/align]
[align=left]The database must have a character set of UTF8. Enter the following command from within the MySQL command client: [/align]
[align=left]create database jiradb character set utf8;[/align]
[align=left](if you want your database to be named jiradb). [/align]
[align=left]3. Ensure that the user has permission to connect to the database, and create and populate tables. [/align]
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.
[align=left]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). [/align]
[align=left] [/align]
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.)
<Context path="" docBase="${catalina.home}/atlassian-jira"
reloadable="false">
<Resource name="jdbc/JiraDS" auth="Container"
type="javax.sql.DataSource"
username="[enter db username]"
password="[enter db password]"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/jiradb?autoReconnect=true
&useUnicode=true&characterEncoding=UTF8"
[ Jiradb:前面为Jira创建的数据库名称 ]
[ delete the minEvictableIdleTimeMillis and
timeBetweenEvictionRunsMillis params here ]
/>
<Resource name="UserTransaction" auth="Container"
type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory"
jotm.timeout="60"/>
<Manager className="org.apache.catalina.
session.PersistentManager" saveOnRestart="false"/>
</Context>
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
<datasource name="defaultDS" field-type-name="mysql"
[ delete this, if it exists: schema-name="PUBLIC" ]
helper-class="org.ofbiz.core.entity.GenericHelperDAO"
check-on-start="true"
use-foreign-keys="false"
相关文章推荐
- 配置Spring连接mysql数据库
- C连接MySQL数据库开发之Windows环境配置及测试
- php连接mysql数据库之环境配置
- 连接mysql数据库的配置文件代码
- [mysql]腾讯云 ubuntu 远程连接mysql数据库配置
- java jdbc连接Mysql数据库Dao模式下的带配置文件的(properies)
- C连接MySQL数据库开发之Windows环境配置及测试
- C连接MySQL数据库开发之Xcode环境配置及测试
- Liferay Portal 连接配置MySQL数据库 (三)
- Java爬虫历险记 -- (3)通过读取Properties配置文件连接mysql数据库
- 【配置】sqlyog远程连接mysql数据库
- IntelliJ IDEA手动配置连接MySQL数据库
- (三)用SubSonic连接MySql数据库的配置
- 安装MySQL先复制1. Linux (CentOS 7.3) 下快速安装Mysql数据库(安装教程)2.后复制阿里云配置 MySQL 远程连接的详细步骤
- spring-boot配置MySQL数据库连接、Hikari连接池、和Mybatis的简单方法
- Spring中集成Hibernate连接MySQL数据库配置
- Tomcat5.0配置MySql数据库连接源
- python 3 django连接mysql数据库配置
- MySql数据库连接字符串,webconfig配置
- C连接MySQL数据库开发之Windows环境配置及测试(转)