Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: change maxActive connection count

...

  1. After creating the database in a MySQL cluster, modify the default datasource configuration in the <GREG_HOME>/repository/conf/datasources/master-datasources.xml file. Replace the URL, username, password, driver class name and any other values with your custom values.

    Code Block
    languagexml
    <datasource>
             <name>WSO2_CARBON_DB</name>
             <description>The datasource used for registry and user manager</description>
             <jndiConfig>
                 <name>jdbc/WSO2CarbonDB</name>
             </jndiConfig>
             <definition type="RDBMS">
                 <configuration>
                     <url>jdbc:mysql://192.168.43.238:3306/carbondb?relaxAutoCommit=true&?autoReconnect=true</url>
                     <username>root</username>
                     <password>root123</password>
                     <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                     <maxActive>50<<maxActive>80</maxActive>
                     <maxWait>60000</maxWait>
                     <testOnBorrow>true</testOnBorrow>
                     <validationQuery>SELECT 1</validationQuery>
                     <validationInterval>30000</validationInterval>
                 </configuration>
             </definition>
         </datasource>
  2. Copy the MySQL jdbc driver library into <GREG_HOME>/repository/components/lib directory.
  3. To create the database tables related to the user store and registry, execute the cluster script located inside the <GREG_HOME>/dbscripts/mysql_cluster.sql file.
  4. If you prefer to create database tables during server startup, replace the content of the <GREG_HOME>/dbscripts/mysql.sql file with the content of the <GREG_HOME>/dbscripts/mysql_cluster.sql file and start the GREG instance with -Dsetup vm argument.