# Database

This addon saves player data utilizing either <mark style="color:green;">SQLite</mark> or <mark style="color:green;">Mysql</mark> (mysqloo module).

By default, this addon uses SQLite. If you wish to utilize this method; no further configurations need to be done. However, if you wish to utilize MySQL; read below.

### <mark style="color:red;">◾ SQLite</mark>

This is the default storage method; which is the built-in Garry's Mod. If you wish to use this method; no further setup needs to be done.

All data will be saved to:

```
garrysmod\sv.db
```

In order to view these records; you must install [DB Browser for SQLite](https://sqlitebrowser.org/).

### <mark style="color:red;">◾ MySQL</mark>

To configure your addon to utilize MySQL; you must configure the file:

```
addons/identix/identix.rlib
```

Within the above file; first ensure you switch the database mode from <mark style="color:red;">sqlite</mark> to <mark style="color:blue;">mysqloo</mark>:

```json
"general"
{
     "mode"          "mysqloo"
}
```

Then insert your MySQL credentials in the same file and then save and close:

```json
"mysql"
{
     "host"          "localhost"
     "port"          "3306"
     "user"          "db_username"
     "pass"          "db_pass"
     "name"          "db_nameu"
}
```

Any time you change the values within this file; you must restart the server for the changes to take affect.

In order to view these records; you must utilize your web hosts' Database Manager / PHPMyAdmin. Contact your host if you're unsure of how to do this.

{% hint style="warning" %}
In order for MySQL connections to function properly; you MUST install the <mark style="color:red;">**MySQLOO**</mark> module which can be [downloaded here](https://github.com/FredyH/MySQLOO/releases/).

We do not provide support for setting this up. Please review the [MySQLOO Installation Instructions here](https://github.com/FredyH/MySQLOO#install-instructions).
{% endhint %}
