`

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

阅读更多
出现如下错误
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.
以下是节选自官方解决方案的方法
http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures


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"这段即可。
分享到:
评论

相关推荐

    Step by Step From the Data Model to BI

    在BW中,可以使用Query Designer创建多维查询,这些查询可以基于InfoCubes或其他BW对象。用户可以通过Web应用程序访问这些查询,这就是"Business Intelligence Application in the Web"部分。在这个阶段,可能会讲解...

    jakarta.validation-api-2.0.1-API文档-中英对照版.zip

    Maven坐标:jakarta.validation:jakarta.validation-api:2.0.1; 标签:jakarta、validation、api、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容...

    JIRA+MYSQL配置

    此外,需要调整数据库连接池的相关设置,比如最大活跃连接数(maxActive)、验证查询语句(validationQuery)等。 6. 将MYSQL JDBC驱动包mysql-connector-java-版本号-bin.jar复制到JIRA安装目录下的/common/lib...

    Practical PHP 7, MySQL 8, and MariaDB Website Databases, Second Edition

    Each project is fully illustrated, so you will see clearly what you are building as you create your own database-driven website. You will build a form for registering users, and then build an ...

    jakarta.validation-api-2.0.2-API文档-中文版.zip

    Maven坐标:jakarta.validation:jakarta.validation-api:2.0.2; 标签:api、jakarta、validation、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...

    validation-api-2.0.1.Final-API文档-中英对照版.zip

    Maven坐标:javax.validation:validation-api:2.0.1.Final; 标签:javax、api、validation、jar包、java、API文档、中英对照版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档...

    validation-api-2.0.1.Final-API文档-中文版.zip

    Maven坐标:javax.validation:validation-api:2.0.1.Final; 标签:javax、api、validation、jar包、java、API文档、中文版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...

    Thingsboard修改为Mysql数据

    validationQuery: SELECT 1 ``` 4. **重新启动Thingsboard** - 保存配置文件后,重启Thingsboard服务以应用更改: - 在Linux上: ``` sudo systemctl restart thingsboard ``` - 在Windows上: 通过服务...

    jakarta.validation-api-2.0.1-API文档-中文版.zip

    Maven坐标:jakarta.validation:jakarta.validation-api:2.0.1; 标签:jakarta、validation、api、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...

    ICS delphixe10源码版

    ICS V7 is a stable release that may still be updated for major bugs, but not for new releases of Delphi, latest it supported was XE3. ICS V8 is the current development release which is held in a ...

    FormValidation.js

    **FormValidation.js 知识点详解** `FormValidation.js` 是一个强大且灵活的JavaScript库,专门用于前端表单验证。它提供了丰富的校验规则、样式定制以及对动态添加元素的验证支持,使得开发者能够轻松地创建高效、...

    asm-xml-1.4.zip

    But if you can't (existing format, enterprise rules, ...), you may have a look at AsmXml. This library is not for kids ! you have to know how to use an object file with your programming language. ...

    TOMCAT6.0配置数据库连接池

    - **示例**:对于 MySQL 可以设置为 `validationQuery="SELECT 1"`。 #### 三、配置示例 假设使用MySQL数据库,以下是在Tomcat 6.0中的具体配置示例: 1. **配置 context.xml 文件** 在 `%TOMCAT_HOME%/conf/...

    validation-api-1.0.0.GA.jar

    validation-api-1.0.0.GA.jar

    spring-multiple-datasources:有关如何使用Liquibase在Spring Boot中配置多个数据源以进行数据库初始化的示例代码

    datasource: primary: url: jdbc:mysql://localhost/primary username: root driver-class-name: com.mysql.jdbc.Driver validation-query: select 1 secondary: url: jdbc:mysql://localhost/secondary ...

    validation-api-1.1.0.Final-API文档-中文版.zip

    赠送jar包:validation-api-1.1.0.Final.jar; 赠送原API文档:validation-api-1.1.0.Final-javadoc.jar; 赠送源代码:validation-api-1.1.0.Final-sources.jar; 包含翻译后的API文档:validation-api-1.1.0....

    Beginning PHP5, Apache, And MySQL Web Development.pdf

    You will also get experience in error handling and data validation while working on this site. ❑ Comic Book Fan Web site. The creation of this Web site takes you through the steps of building ...

Global site tag (gtag.js) - Google Analytics