> For the complete documentation index, see [llms.txt](https://innovative-studios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://innovative-studios.gitbook.io/docs/resources/admin-panel/guides/setting-up-a-database-user.md).

# Setting up a Database User

This page will cover setting up a database user on a Windows MariaDB Server instance using the popular database GUI [HeidiSQL](https://www.heidisql.com/)

## Connect to your database

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2FRrChuQLm37Hd3meYr8EM%2Fimage.png?alt=media&amp;token=d52592e5-9b2e-4cb9-8570-437a2fbf21cf" alt=""><figcaption></figcaption></figure>

Then click Tools on the top-navbar, and click User Manager

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2FrLGLEWKPBbL6WLkirebk%2Fimage.png?alt=media&amp;token=9fe7b047-c1e0-44fc-9aef-f90b6666e406" alt=""><figcaption></figcaption></figure>

Select "Add" and fill out the credentials.

Username: `adminpanel` (or your preference)

Host: `%` or the IP of the connecting user (more secure)

* Using % will allow any IP to connect (assuming they use the correct username/password)

Password: Set a secure password, you are exposing your database to the internet.

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2FRZepWrAZc3KiyNCGrl1D%2Fimage.png?alt=media&amp;token=4affae01-2146-4dd1-8903-0ab6d05416b1" alt=""><figcaption></figcaption></figure>

Click the checkbox next to Global Privileges, then hit save.

{% hint style="success" %}
Your database user has been successfully created, be sure to save these credentials somewhere safe.
{% endhint %}

## Allowing connections over port 3306/tcp

Next, we will go over opening port 3306 via the windows advanced firewall manager.

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2FFFTpOO8k8MUA4LweUzcj%2F%7B7851D765-3533-4765-A63B-EC87821A55A1%7D.png?alt=media&amp;token=82732bdc-ffda-4e14-a25a-2233022053bc" alt=""><figcaption></figcaption></figure>

You know you are in the right spot once you see:

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2FxO2zh8Iba4OEP26a5Oag%2Fimage.png?alt=media&amp;token=3b0d9ab4-743d-4e16-b155-2967bf347644" alt=""><figcaption></figcaption></figure>

Click New Rule on the right side

<figure><img src="https://960418125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIkRgoqW1jzHsXpqDqi7%2Fuploads%2Fg6x98GWcFTxwK7E0gRYQ%2Fimage.png?alt=media&amp;token=de9e4785-0b16-4b1e-8610-e75b84991740" alt=""><figcaption></figcaption></figure>

Then fill out the configuration as follows:

* What type of rule...?
  * Port
  * Click Next
* Does this rule apply to TCP or UDP?
  * TCP
* Does this rule apply to all local ports....?
  * Specific local ports: 3306
  * Click Next
* What action....?
  * Allow the connection
  * Click next
* When does this rule apply?
  * Leave all checked
  * Click Next
* Name (does not actually matter, for your own records)
  * 3306 TCP
  * Click Finish
