出现如下错误
[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"这段即可。
[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"这段即可。