MySQL for CrowdID



アトラシアン コミュニティをご利用ください。


Follow the steps below to connect CrowdID to MySQL.

1. Configure MySQL

  1. Create a database user which CrowdID will connect as (e.g. crowduser).
  2. Create a database for CrowdID to store data in (e.g. crowdiddb).
    (warning) This must be a different database from the one used by Crowd.
    For a UTF-8 encoded database:

    create database crowdiddb character set utf8;
  3. Ensure that the user has permission to connect to the database, and create and populate tables.

2. Copy the MySQL Driver to your Application Server

  1. Download the latest MySQL Connector/J JDBC driver.
  2. Add the MySQL JDBC driver jar (mysql-connector-java-3.x.x-bin.jar) to the following directory:
    • Crowd 2.0.2 or later: {CROWD_INSTALL}/apache-tomcat/lib/.
    • Crowd 2.0.1 or earlier: {CROWD_INSTALL}/apache-tomcat/common/lib/.

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).

3. Configure your Application Server to Connect to MySQL

  1. Edit the file apache-tomcat-X.X.XX/conf/Catalina/localhost/openidserver.xml and customize the username, password, driverClassName and urlparameters for the Datasource.

    <Context path="/openidserver" docBase="../../crowd-openidserver-webapp" debug="0">
    <Resource name="jdbc/CrowdIDDS" auth="Container" type="javax.sql.DataSource"
    username="[enter db username here]"
    password="[enter db password here]"
    [ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ]
    <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>

    The URL above assumes a UTF-8 database — i.e. created with create database crowdiddb character set utf8;.

    MySQL closes idle connections after 8 hours, so the autoReconnect=true is necessary to tell the driver to reconnect.

  2. Delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive attributes (which are only needed for HSQL, and degrade performance otherwise).

4. Configure CrowdID to use MySQL

  1. Edit the file (located in the root of the Crowd distribution) and modify the hibernate.dialect to the following.

  2. Then run ./ or build.bat. This will configure CrowdID to use the MySQL dialect.

If you do not wish to edit this file and run the build script, you can edit the (which the above script modifies) directly. The file is located here: crowd-openidserver-webapp\WEB-INF\classes\ Modify the file to the following:

# - Crowd Configuration Options




You should now have an application server configured to connect to a database, and CrowdID configured to use the correct database. Now start up CrowdID and watch the logs for any errors.


最終更新日 2023 年 9 月 29 日


Powered by Confluence and Scroll Viewport.