When working with the binary version of Restcomm, the default database is hsqlDB. This is of course not suitable for production but it is provided as a way for you to conveniently and quickly start up Restcomm. For those who would like to run Restcomm on a local server or on another cloud based system, the following tutorial will show how to get started with Restcomm and Mysql.


Step 1 - Download Mysql Java Connector and Configure Java Connector

  • Download mysql java connector as explained HERE

  • Create the following folder stucture mkdir -p $RESTCOMM_HOME/modules/org/mysql/jdbc/main

  • Download the myqls jar file into the main directory, cp mysql-connector-java-5.1.40.jar $RESTCOMM_HOME/modules/org/mysql/jdbc/main

  • create a the file module.xml vi $RESTCOMM_HOME/modules/org/mysql/jdbc/main/module.xml make sure the content of the module.xml looks like the one below with the appropriate mysql connector jar file name.

<?xml version="1.0" encoding="UTF-8" ?>
<module xmlns="urn:jboss:module:1.1" name="org.mysql.jdbc">
        <resource-root path="mysql-connector-java-5.1.40.jar"/>
                <module name="javax.api"/>
                <module name="javax.transaction.api"/>

Step 2 : Configure the standalone-sip.xml to use the Mysql Connector

  • Edit the file $RESTCOMM_HOME/standalone/configuration/standalone-sip.xml

  • Edit the datasource and make sure it looks like the section below

  • Note that the IP 192.168.1:3306 is the IP where mysql is listening for traffic

         <datasource jndi-name="java:/MysqlDS" pool-name="MysqlDS" enabled="true">

            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="false" use-java-context="true">
                <driver name="mysqlDriver" module="org.mysql.jdbc">
                    <driver name="h2" module="com.h2database.h2">

Step 3 : Create restcomm database in mysql and grant DB privileges

  • Create restcomm database in mysql as follows

 mysql -u root -p < $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/scripts/mariadb/init.sql
  • The command above will create a restcomm database inside mysql

  • log into mysql to make sure the database is created.

mysql -u root -p

show databases;
use restcomm;
show tables;
  • Grant the appropriate DB privileges to the user, in the example, root


then save the changes as follows

The above command will allow your use to be able to access the DB on 192.168.1.x subnet
The is important if you have multiple Restcomm instances in the same subnet and they will need to Replicate DB on a MASTER-MASTER format

WARNING: If you need to change an existing GRANT, you can use the ALTER command as follows

  • Restart mysql service

sudo service mysql restart

or like this

sudo /etc/init.d/mysql restart
If you are unable to access your mysql server on the IP on which Restcomm is installed, please make sure you checking the following.
Edit the file /etc/mysql/my.cnf and make sure bind to is disabled or commented out like this
#bind-address  =

Run the following command to make sure mysql is not bound to the loopback ( address (below it is listening to all IP)

netstat -lnp | grep mysql
tcp        0      0  *               LISTEN      7657/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     77682    7657/mysqld         /var/run/mysqld/mysqld.sock

Step 4 : UPdate mybatis.xml file to use Mysql

  • Edit $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/mybatis.xml

  • The environment tag should look like the example below:

<environments default="mysql">
    <environment id="mysql">
                <transactionManager type="JDBC" />
                <dataSource type="JNDI">
                  <property name="data_source" value="java:/MysqlDS" />
<!--    <environment id="production">
      <transactionManager type="JDBC"/>
      <dataSource type="POOLED">
        <property name="driver" value="org.hsqldb.jdbcDriver"/>
        <property name="url" value="jdbc:hsqldb:file://${data}/restcomm;ifexists=true;hsqldb.write_delay=false;shutdown=true"/>
        <property name="username" value="sa"/>
        <property name="password" value=""/>

Step 5 - Update the dao-manager in the dao-manager.xml file

  • It should disable the default hsql and use mariadb sql which is the same as the one for mariadb

   <!-- <dao-manager class="org.restcomm.connect.dao.mybatis.MybatisDaoManager">
    <dao-manager class="org.restcomm.connect.dao.mybatis.MybatisDaoManager">

Start Restcomm

  • Go to the $RESTCOMM_HOME/bin/restcomm/ directory. command:

  • Open your web browser and go to the url – http://IP:8080. Instead of "IP" you should put your IP.

  • Log in with the administrator@company.com username and the RestComm password. Then you should change the default password. If you have changed the default password before, you should insert your own password at once.

Here you can read the detailed information on Starting Restcomm-Connect.