[KB7809] Create a database and database user for ESET PROTECT On-Prem (Windows)

Issue

  • Create a database in Microsoft SQL or MySQL for the ESET PROTECT Server installation
  • Create a dedicated database user for Microsoft SQL or MySQL

Details


Click to expand

We recommend creating a dedicated database and a dedicated database user for the ESET PROTECT Server. Using high-privilege database administrator accounts such as sa (Microsoft SQL) or root (MySQL) is not recommended, as ESET PROTECT does not require full administrative access. A dedicated user and database provide a clearer, safer, and supported setup for connecting ESET PROTECT Server to its database.


Solution

A dedicated database user is required for ESET PROTECT On-Prem

We recommend using at least one dedicated database user exclusively for the ESET PROTECT On-Prem database. The same database user should not be shared with other database components or used for different purposes.


Create a dedicated database and database user for ESET PROTECT On-Prem in Microsoft SQL

Prerequisites
Create a database for ESET PROTECT On-Prem in Microsoft SQL
  1. Open Microsoft SQL Server Management Studio and log in with your administrator account.

  2. In Object Explorer, right-click Databases and select New Database from the context menu.

  3. In the Database name field, type the database name. For example, use the default ESET PROTECT On-Prem database name era_db.

    Remember the database name

    Remember or record the database name, as you will need it later during the ESET PROTECT Server installation and database connection setup.

  4. Click OK.

Create a dedicated database user for ESET PROTECT On-Prem in Microsoft SQL and assign it to the dedicated database
Remember the database user credentials and keep them safe

Remember the database user account name and password, or store them securely. You will need the credentials later during the ESET PROTECT Server installation and database connection setup.

  1. Open Microsoft SQL Server Management Studio and log in with your administrator account.

  2. In Object Explorer, right-click Security and click NewLogin.

  3. In the Login name field, type the user account name. For example, use the default ESET PROTECT On-Prem database username era_user.

  4. Select SQL authentication and type and confirm the user account password.

  5. In the left-side menu, click User Mapping and select the check box next to the database you created. The user account name should appear in the User column next to the selected database.

  6. Below Database role membership, select the check box next to db_owner and click OK.


Create a dedicated database and database user for ESET PROTECT On-Prem in MySQL

Prerequisites
Create a database for ESET PROTECT On-Prem in MySQL
  1. Open your MySQL administration tool and log in to the local database using the root account and password. Set the hostname to 127.0.0.1. Click Open.

  2. Right-click the database root and select Create newDatabase from the context menu.

  3. In the Name field, type the database name. For example, use the default ESET PROTECT On-Prem database name era_db. Click OK.
Create a dedicated database user for ESET PROTECT On-Prem in MySQL and assign it to the dedicated database
Remember the database user credentials and keep them safe

Remember the database user account name and password, or store them securely. You will need the credentials later during the ESET PROTECT Server installation and database connection setup.

  1. Open your MySQL administration tool and log in to the local database using the root account and password. Set the hostname to 127.0.0.1. Click Open.

  2. Click ToolsUser manager.

  3. Click AddUser.

  4. Provide the user details:

    • In the User name field, type the username. For example, use the default ESET PROTECT On-Prem database username era_user.
    • In the From host drop-down menu, select Access from everywhere or type %.
    • In the Password and Repeat password fields, type the password.

  5. Click Add object, select the database you created and click OK.

  6. Below Privileges, select the check box next to the created database and deselect SHOW VIEW, EVENT, REFERENCES, and GRANT, so that the following privileges are selected:

    • EXECUTE
    • SELECT
    • ALTER
    • ALTER ROUTINE
    • CREATE
    • CREATE ROUTINE
    • CREATE TEMPORARY TABLES
    • CREATE VIEW
    • DELETE
    • DROP
    • INDEX
    • INSERT
    • TRIGGER
    • UPDATE
    • LOCK TABLES

  7. Click Save.

  8. Ensure the user you created is selected in the left-side menu and click Clone. For the user to be cloned, in the From host drop-down menu, select Access from server location only or type localhost. In the Password and Repeat password fields, type the password. Click Save.

You have created two database users with the same username: one allowing connections from any host and one restricted to localhost only.