> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/installation-setup/installation/database-backend/mariadb.md).

# MariaDB

Using the MariaDB storage engine you can use any MariaDB setup as your ngSurvey backend.&#x20;

## Requirements

To install  ngSurvey on a MariaDB database you will need to meet following requirements

1. MariaDB version 10.6.x or above.
2. User used to connect to the MariaDB server must have enough privileges to use the MariaDB system database to create the database.&#x20;
3. If binary logging is enabled you must set the log\_bin\_trust\_function\_creators variable to 1 either in your MySQL configuration file or using following query.\
   `SET GLOBAL log_bin_trust_function_creators = 1;`
4. Windows based MariaDB version requires to have loaded time zone data tables . You may follow this [tutorial](https://www.geeksengine.com/article/populate-time-zone-data-for-mysql.html) to load up time the zone data on your Windows MariaDB server.

## NGSurvey configuration

In order to configure ngSurvey to work with MariaDB you need to setup following environment variables.

{% hint style="info" %}
NGSurvey will automatically create or update the database that you have specified in the connection string.&#x20;
{% endhint %}

* **`ConnectionStrings:NGSurveyDB`** holds your connection string to your MariaDB server.
* **`NGSurvey:StorageEngine`** must be set to *MariaDB.*

## Health check

Once you have configured your database settings you may re-start the web service hosting ngSurvey. NGSurvey will automatically setup the database will all the required tables.

You may also check if your installation is properly setup using following link :\
<https://yourrootsite/api/system/status>

## File uploads

If you're planning to collect files from your respondents using file upload answers make sure that you set a large max\_allowed\_packet size in your MySQL configuration file as this defines the max size of files that will be stored in your MySQL database

```
[mysqld]
max_allowed_packet=512M
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/installation-setup/installation/database-backend/mariadb.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
