jira開發 連接mysql數據庫


ira系統啟動默認連接內置的h2數據庫,如果需要使用其他類型的數據庫,需要修改數據配置,並放入相應的驅動jar包

數據庫配置文件目錄target/jira/home/dbconfig.xml

驅動jar目錄target/container/tomcat8x/apache-tomcat-8.0.36/lib/*.jar

連接一個新的數據庫,需要到attlassian的官網上申請一個試用的license key(申請過程中,如果有頁面加載超時,需連接vpn),有效期為一個月

Atlassian JIRA 如何從數據庫備份導入項目數據?

原有一台 JIRA 服務器,數據放在另外一台的MySQL里;現在 JIRA 服務器掛了,JIRA 服務器上的東西都丟了,沒有備份,只剩下數據庫。於是重新搭建 JIRA,鏈接原來的數據庫,但是用戶登陸以后卻看不到之前的項目數據,項目里面也是空的。

 

JIRA 頁面顯示的 Issue 不是直接查詢數據庫的,是通過 JIRA 本地的 Lucence 去查詢數據,只需要 ReIndex 一下,生成索引就可以了。

路勁:System--》ADVANCED(indexing)

地址:secure/admin/IndexAdmin.jspa

 

jira連接mysql數據庫,dbconfig配置

 
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mysql</database-type>
<jdbc-datasource>
<url>jdbc:mysql://localhost:3306/jiradb</url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<username>root</username>
<password>root</password>

<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000
</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-while-idle>true</pool-test-while-idle>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

jira連接oracle數據庫,dbconfig配置

 

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>oracle10g</database-type>
<jdbc-datasource>
<url>jdbc:oracle:thin:@192.168.70.83:1521:ORCL</url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<username>scott</username>
<password>Sn314159_</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>



<validation-query>select 1 from dual</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>

<pool-test-while-idle>true</pool-test-while-idle>
<pool-test-on-borrow>false</pool-test-on-borrow>

</jdbc-datasource>
</jira-database-config>

jira連接PostgreSQL數據庫,dbconfig配置

<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<jdbc-datasource>
<url>jdbc:postgresql://localhost:5432/DsdCommon</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>postgres</username>
<password>root</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000
</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-while-idle>true</pool-test-while-idle>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

jira連接sqlserver數據庫,dbconfig配置

<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mssql</database-type>
<schema-name>dbo</schema-name>
<jdbc-datasource>
<url>jdbc:jtds:sqlserver://192.168.70.109:1433/jiraDB</url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<username>sa</username>
<password>dsd123456</password>
<!--ӔЂӎ˽ࠉӔһԃƤ׃ -->
<pool-min-size>20 </pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000
</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-while-idle>true</pool-test-while-idle>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM