This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Setting up MariaDB
The following sections describe how to set up MariaDB to replace the default H2 database in your WSO2 product
Setting up the database and users
Follow the steps given below to set up MariaDB. See Tested DBMSs for information on the MariaDB versions that are tested with WSO2 products.
Download, install and start MariaDB on your computer. See https://downloads.mariadb.org/.
Log in to MariaDB as the root user (or any other user with database creation privileges).
mysql -u root -pEnter the password when prompted.
In the MySQL command prompt, create the database using the following command:
create database regdb;Give authorization to the regadmin user as follows:
GRANT ALL ON regdb.* TO regadmin@localhost IDENTIFIED BY "regadmin";Once you have finalized the permissions, reload all the privileges by executing the following command:
FLUSH PRIVILEGES;Log out from the MySQL prompt by executing the following command:
quit;
Setting up the drivers
Download the MySQL Java connector JAR file, and copy it to the <PRODUCT_HOME>/repository/components/lib/ directory.
Note that you must use the MySQL connector that is compatible with your MariaDB version. For example, mysql-connector-java-5.1.36-bin.jar is compatible with MariaDB version 10.0.20. See Tested DBMSs for information on the WSO2 products that have been tested for compatibility with different versions of MariaDB and MySQL connectors.
What's next
By default, all WSO2 products are configured to use the embedded H2 database. To configure your product with MariaDB, see Changing to MariaDB.