> 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="/files/hJhu3AE6iKsZxVWmx6Yp" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
