> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/e/eset-protect-mysql.md).

# ESET Protect MySQL

ESET PROTECT can store its data in a MySQL database. OctoXLabs connects to that database and runs a read only query to add the managed computers, with IP address and RAM, to the inventory.

## Use cases

* Find computers managed by ESET PROTECT that your CMDB lacks.

```
Adapters = eset-protect-mysql AND NOT Adapters = servicenow-cmdb
```

* Find computers in your inventory that ESET PROTECT does not manage.

```
Adapters = falcon-crowdstrike AND NOT Adapters = eset-protect-mysql
```

## Before you begin

### Network

| Source              | Destination               | Port                | Protocol |
| ------------------- | ------------------------- | ------------------- | -------- |
| OctoXLabs connector | ESET PROTECT MySQL server | 3306 (configurable) | MySQL    |

### Required permissions

| Scope or role                                            | Permission | Needed for                                                                                |
| -------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------- |
| Schema privilege **SELECT** on the ESET PROTECT database | Select     | `tbl_computers`, `tbl_computers_aggr`, `vw_hwinventory_overview`, `tbl_database_metadata` |

Log in to the database once with the new user, to avoid an error.

## Create credentials in ESET PROTECT

{% stepper %}
{% step %}

### Open the user

In MySQL, go to **Management** > **Users and Privileges** and select the user you want to grant permissions to.
{% endstep %}

{% step %}

### Add schema privileges

Click **Schema Privileges** and **Add Entry**. Select the database and click OK.
{% endstep %}

{% step %}

### Grant SELECT

Check **SELECT** under **Object Rights**, click Apply and confirm.
{% endstep %}

{% step %}

### Log in once

Log in to the database with this user once.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type              | Default | Description                                                                                                    |
| ------------- | -------- | ----------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| IP            | Yes      | String            | None    | IP address of the MySQL host.                                                                                  |
| Port          | No       | Integer           | `3306`  | Port.                                                                                                          |
| Domain        | No       | String            | None    | Domain FQDN.                                                                                                   |
| Database      | Yes      | String            | None    | Database name.                                                                                                 |
| Username      | Yes      | String            | None    | Database user.                                                                                                 |
| Password      | Yes      | String            | None    | Password.                                                                                                      |
| View Name     | No       | String            | None    | A complete SQL query to run instead of the built-in one. It is run as a whole, not wrapped in `SELECT * FROM`. |
| Custom Query  | No       | String            | None    | Another full query. Used when View Name is empty.                                                              |
| Query Timeout | No       | Integer (seconds) | `60`    | Maximum time for a query.                                                                                      |

## Troubleshooting

| Error message | Cause                                                             | Fix                                                   |
| ------------- | ----------------------------------------------------------------- | ----------------------------------------------------- |
| Not verified  | The connector code defines no custom error text for this adapter. | Check the credentials and network access to the host. |

## Change history
