WARNING: You are using MySQL but do not have a validation query configured

出现如下错误
[color=red]WARNING: You are using MySQL but do not have a validation query configured. Because of MySQL connection timeouts, this situation can cause data corruption in JIRA. For more information please see this bug report.[/color]
以下是节选自官方解决方案的方法
[url]http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures[/url]


Setting the validationQuery parameter
In your application server, where the JDBC DataSource is configured, a parameter needs to be added to tell the Connection Pool to use a validation query (determined above) to validate connections.

JIRA Standalone (after version 3.2) or JIRA EAR/WAR on Tomcat 5.5 and Tomcat 6.0
If you are using JIRA Standalone, edit conf/server.xml
If you are using JIRA EAR/WAR on Tomcat 5.5 or Tomcat 6.0, edit conf/Catalina/localhost/jira.xml

Locate the section where the 'jdbc/JiraDS' DataSource is set up, and add the following:

· If you are using MySQL or MS SQL Server, add validationQuery="select 1"
· If you are using Oracle, add validationQuery="select 1 from dual"
· If you are using Postgres, add validationQuery="select version();"
For example (for MySQL):

<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8"
username="jirauser"
password="jirapassword"
maxActive="20"
validationQuery="select 1" />
按照以上文档所写,就是在 conf/server.xml或者新版本中的conf/Catalina/localhost/jira.xml添加以上蓝色内容即可解。只要按照文档做下来的话,一般只要加入validationQuery="select 1"这段即可。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值