# DB Backups

Follow the instructions below to backup your database. You need to gather your details for your database and server details. \
\
Backups for all regular members are every 4 days and have a max of 2 backups all together.&#x20;

## Backup Settings

{% hint style="success" %}

#### Name:

Enter a memorable name for your reference, such as the name of your RP server.

#### MySQL Host:

This is the IP address of the server where your database is hosted (where XAMPP or MySQL is installed).

#### MySQL Port:

The default port is usually 3306, but you may have a custom port. You need to open this port in your firewall to allow the connection. For instructions on how to open your ports, you can visit [this](https://docs.1of1servers.com/1-of-1-knowledge-base/opening-your-ports) article. Ensure you open port 3306 for TCP incoming only.

\
**IMPORTANT:** **DO NOT** open your ports without adding a password to your database, as this will allow anyone to log into your database.
{% endhint %}

{% hint style="success" %}
MySQL Database:\
To find the name of your database, you can use a database viewer such as HeidiSQL. Refer to the example below for guidance. If you are using this for FiveM, you can typically find the database name in your `server.cfg` file.

![](/files/5crZu7Hb0aU1jzBJIT4z)\
\
MySQL User:\
You can typically find the MySQL user in the `mysql_connection_string` section of your FiveM `server.cfg` file. By default, it is usually set to `root` unless it has been changed.
{% endhint %}

{% hint style="danger" %}
MySQL Password: \
If it is currently unset (no password), you need to set a password for security reasons.

**IMPORTANT:** **DO NOT** open your ports without adding a password to your database, as it will allow anyone to log into your database.

To add a password to your database, open your database command prompt and run the following command, replacing `MyNewPasswordGoesHere` with the password you want to set:

```sql
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPasswordGoesHere');
FLUSH PRIVILEGES;

```

After setting a password, you need to configure your database to allow connections from outside your local machine. Open your database command prompt and run the following command, replacing `MyPasswordGoesHere` with your database password:

```sql
CREATE USER 'root'@'%' IDENTIFIED BY 'MyPasswordGoesHere';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
```

\
If this is for FiveM, your `server.cfg` should then be updated to include the following line with your new password and your database name.

```sql
set mysql_connection_string "mysql://root:MyNewPasswordGoesHere@localhost/YourDataBaseNameHere?charset=utf8mb4"
```

{% endhint %}

<figure><img src="/files/yNdVOp0zmwZaqohiwyKl" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.fivemerr.com/features/db-backups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
