Clone wiki

CFMariaDB / Home

CFMariaDB Documentation

CFMariaDB is a small CFML application that wraps MariaDB4J - which itself wraps MariaDB.

The primary use case why this project was created is to allow easy local development of database applications without having to install or configure a database manually. It is also useful to be used in headless environments - e.g. a CI process which quickly fires up an internal db for automated unit testing.

Installation and Usage

Either use the project within an existing lucee webroot or use CommandBox (which is the recommended approach)

The CommandBox approach is as follows:

  1. Open a terminal
  2. start CommandBox, e.g 'box'
  3. create a directory, e.g. 'mkdir cfmariadb'
  4. navigate to the just created directory, e.g. 'cd cfmariadb'
  5. do 'install cfmariadb' ( entry)
  6. do 'server start'
  7. A browser window automatically opens displaying a simple server manager - you now have MariaDB running and can connect to it

This will install cfmariadb within the created directory along with the related dependencies (mariadb4j and javaloader), start a lucee server instance and then initialize the mariadb wrapper application.

By default the latest master branch of cfmariadb will be used. If you want to use the develop branch, use 'package install git://' instead. If you need a specific version, use e.g. 'package install git://' (in this example you will then get version 0.1.0).

Also by default 'server start' will use 512mb heapsize which may or may not be sufficient to run mariadb4j. If you experience problems with insufficient JVM memory, use 'box server start heapsize=768' (or whatever heapsize you need).

You can shutdown the DB server within the simple server manager control app or via 'server stop' within CommandBox.

Data is stored in the '/data' subdirectory and is persisted also across server restarts.

The project has 2 permanent branches: develop and master. master contains (somewhat stable) releases, develop contains the latest development status.

An alternative way to use the project is to manually download or clone the repository to a local directory on your computer.

The default port used for the database is 3336. If you want to use a different port, simply copy to and change the port in the file.

If you want to use the MariaDB service within an existing application, just create an instance of cfmariadb.MariaDB. Have a look at index.cfm and Application.cfc of how it can be used.

Bugs / Problems / Feature Requests / Ideas

Please use the issue tracker which can be found here:


The repo uses the gitflow branching model. See here: Intro blog post or Atlassian Tutorial - Gitflow workflow

If you want to contribute we are happy to receive your pull requests. Please fork the project and use either a feature branch or the develop branch.

Have fun with the project code. We are happy to hear from you.