This is the latest release in the 6.x.x family. For EI 7.0.0, click here.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To create the database tables, connect to the database that you created earlier and run the relevant scripts.

...

Alternatively, you can create database tables automatically when starting the product for the first time by using the -Dsetup parameter as follows:

  • For Windows: <PRODUCT_HOME>/bin/wso2server.bat -Dsetup

  • For Linux: <PRODUCT_HOME>/bin/wso2server.sh -Dsetup

Multiexcerpt include
MultiExcerptNameDsetup-dep
PageWithExcerptChanging to Embedded Derby

  1. To create tables in the registry and user manager database (WSO2CARBON_DB), execute the relevant script as shown below. 

    Code Block
    languagepowershell
    mysql -u regadmin -p -Dregdb < '<PRODUCT_HOME>/dbscripts/mysql.sql';
    Note
    titleFor MySQL 5.7:

    Anchor
    mysqlnote
    mysqlnote

    From Carbon kernel 4.4.6 onwards your product will be shipped with two scripts for MySQL as follows (click here to see if your product is based on this kernel version or newer):

    • mysql.sql : Use this script for MySQL versions prior to version 5.7.

    • mysql5.7.sql : Use this script for MySQL 5.7 and later versions.
       

    Note that if you are automatically creating databases during server startup using the -DSetup option, the mysql.sql script will be used by default to set up the database. Therefore, if you have MySQL version 5.7 set up for your server, be sure to do the following before starting the server:

    1. First, change the existing mysql.sql file to a different filename.

    2. Change the <PRODUCT_HOME>/dbscripts/mysql5.7.sql script to mysql.sql .
    3. Change the <PRODUCT_HOME>/dbscripts/identity/mysql5.7.sql script to mysql.sql .

    MySQL 5.7 is only recommended for products that are based on Carbon 4.4.6 or a later version.

  2. Restart the server.

...

hiddentrue

Note to writers: Add this content at the end of the page if any of the additional databases is relevant to your product.

Changing the identity/storage/product-specific databases

>The topics above show how to change the WSO2_CARBON_DB, which is used to store registry and user manager information. If you changed the product-specific database that comes by default or set up a separate database for identity or storage related data, the instructions are the same. In summary:

...

Create the database tables using the following scripts:

...

Update the following configurations, with the defined datasource name of the corresponding database configuration you added to the <PRODUCT_HOME>/conf/datasources/master-datasources.xml file.

If you are setting up a separate database to store identity-related data, update the following configurations in the <PRODUCT_HOME>/conf/identity.xml file.

Code Block
languagexml
<JDBCPersistenceManager>
	<DataSource>
		<!-- Include a data source name (jndiConfigName) from the set of datasources defined in master-datasources.xml -->
		<Name>jdbc/WSO2CarbonDB</Name>
	</DataSource>
</JDBCPersistenceManager>

...

  1. .