> 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/oracle-mysql.md).

# Oracle MySQL

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

## Requirements

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

1. MySQL version 8 or above.
2. User used to connect to the MySQL server must have enough privileges to use the MySQL 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 MySQL version requires to have loaded time zone data tables . You may follow this [tutorial](https://www.raymondcamden.com/2012/02/27/How-to-add-MySQL-time-zone-tables-on-Windows) to load up time the zone data on your Windows MySQL server.

{% hint style="danger" %}
ngSurvey requires that the MySQL server is configured with working system time zone tables. If your MySQL installation is not setup with time zone you can add them manually <https://dev.mysql.com/doc/refman/8.4/en/mysql-tzinfo-to-sql.html>
{% endhint %}

## NGSurvey configuration

In order to configure ngSurvey to work with MySQL 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 MySQL server.
* **`NGSurvey:StorageEngine`** must be set to *MySQL*.

<img src="https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8fLhS0bmfBRyq0HdUm%2Fuploads%2FyEOJYoy7l1QMY6qZuup8%2Fimage.png?alt=media&amp;token=71aefb1b-ae1a-4e20-b8d4-6fb44560f139" alt="" data-size="original">

## 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 ini 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/oracle-mysql.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.
