Versions Compared

Key

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

NOTE TO WRITERS: Add the following to the beginning of your hosting page:

The following sections describe how to replace the default H2 databases with MySQL:

Table of Contents
maxLevel3
locationtop
styleborder:1
separatorpipe

...

  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';
    Note

    If you are using MySQL version 5.7 or later, use the following script instead:

    mysql -u regadmin -p -Dregdb < '<PRODUCT_HOME>/dbscripts/mysql5.7.sql';
    Note

    If you prefer to populate MySQL 5.7 or later with the -Dsetup command, rename mysql5.7.sql to 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

...