Versions Compared

Key

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

...

  1. To create tables in the registry and user manager database (WSO2CARBON_DB), use the below script:

    Info

     You may have to enter the password for each command when prompted.

    Code Block
    languagepowershell
    mysql -u regadmin -p -Dregdb < '<PRODUCT_HOME>/dbscripts/mysql.sql';
  2. Restart the server.

    Info

    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

...

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 come by default or set up a separate database for identity or storage related data, the instructions are the same. In summary:

Add a new datasource configuration to the following files for each of the separate databases that you need to create.

...

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>

...