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

Issue

  • You do not have an appropriate database for your ESET PROTECT Server installation
  • You want to set up a dedicated database user for MS SQL or MySQL

Details


Click to expand

The creation of an Administrator or root account is required as part of MS SQL or MySQL installation. It is not recommended to use sa / root (database administrator) account for ESET PROTECT Server to connect the database. You should create a dedicated database user as well as a dedicated database.


Solution


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

A dedicated database must have at least one dedicated user

Do not use the same database user for more components or purposes. Each component (ESET PROTECT Server, MDM Server) needs its own database and database user.

Prerequisites
Create a database
  1. Open the MS 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. Type the database name in the Database name text box. You will need this name during the ESET PROTECT On-Prem installation. For example, you can use the default ESET PROTECT On-Prem database name era_db.

  4. Click OK and continue to the next section to assign a new user to your database.

Create and assign new user
  1. Open MS SQL Server Management Studio and log in with your Administrator account.

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

  3. Type the username of your new user in the Login name field. For example, you can use the default ESET PROTECT On-Prem database username era_user.

  4. Select SQL Server authentication.

  5. Set your new password and type it in the Password and Confirm password fields. You can also set other properties here, but it is not required.

  6. Select User Mapping and select the check box next to the database you created. Your username should appear in the column User next to the database you selected. 

  7. Select the check box next to db_owner in the Database role membership section. Click OK to save your changes.

Figure 1-1

Keep your credentials safe

You will need your database name and credentials (username and password) during ESET PROTECT On-Prem installation.


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

Prerequisites
  • You must have administrative access to the operating system.
  • A supported MySQL Server must be installed and properly configured on Windows.
  • You must have an administrator account in MySQL.
  • In this article, we use HeidiSQL as our administration tool. You can use a different tool or the command line to achieve the same results, however, some steps may differ according to the tool you use.
Create a database
  1. Open your MySQL administration tool and log in to the local database using the root account and password. Set the Hostname as 127.0.0.1.

  2. Click Open to open your session. Right-click the database root and select Create new → Database from the context menu.

    Figure 2-1

  3. Type a name for your database. For example, you can use the default ESET PROTECT On-Prem database name era_db. Click OK.
Create and assign new user
  1. Open your MySQL administration tool and log in to the local database using a root account.

  2. Set the Hostname to 127.0.0.1.

  3. Click ToolsUser manager.

    Figure 2-2

  4. Click Add and provide the details about the new database user:

    • Type name of new user into the Username field. For example, you can use the default ESET PROTECT On-Prem database username era_user.
    • Set the From host value to Access from everywhere (%).
    • Set a secure password in the Password and Repeat password text boxes.

      Figure 2-3

  1. Click Add object, select the database you created earlier and then click OK.

    Figure 2-4

  2. Under Allow access to, select the new database and mark the following properties:

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

Click Save to confim the user settings.

Figure 2-5

  1. Click Clone. For the newly copied user, change the value of From host to Access from server location only (localhost) and then click Save.

    Figure 2-6

In the end, you have two users with the same name – a user with access from anywhere and a user with localhost access only.

Keep your credentials safe

You will need your database name and credentials (username and password) during ESET PROTECT On-Prem installation.