Define a production database

Point UserLock to a new, empty SQLite, SQL Server or MySQL production database from the console database wizard.

Published September 25, 2025

About production databases

UserLock stores session events and administrator actions in its production database. By default, UserLock ships with an SQLite database. You change the production database from the database wizard in the console.

This guide describes how to connect UserLock to a new, empty database. To keep your existing data, see Migrate the UserLock database instead: it follows the same wizard.

Note

Automatic database creation

You no longer need to create the database beforehand. If the database name (SQL Server, MySQL) or the file (SQLite) you enter in the wizard does not exist, UserLock creates it, along with the required tables.

Situation

What UserLock does

Account rights required

The SQL Server or MySQL database does not exist

Creates the database and its tables

Create databases on the server

The SQL Server or MySQL database already exists

Connects to it without modifying existing data

Read, write and create tables

The SQLite file does not exist

Creates the file and its tables

Not applicable (no database account)

The SQLite file already exists

Connects to it without modifying existing data

Not applicable (no database account)

With Windows authentication, give these rights to the Service impersonation account.

Unlike a migration, which clears the UserLock tables of the target database, Don't migrate data leaves an existing database unchanged.

Connect a new database

  1. In the UserLock console, click the ⚙️ wheel (top right), then select Database in the left menu.

  2. Under Production database, click Change production database. The database wizard opens.

  3. On the Select the database provider step, select SQLite, SQL Server, MySQL or Connection string, then click Continue.

  4. Enter the connection details, then click Continue. UserLock tests the connection before moving to the next step. For the fields of each provider, see Server settings ▸ Database.

  5. On the Data migration step, select Don't migrate data, then click Continue. If the database already exists, its data is not modified.

  6. On the Confirm database changes step, review the summary, then click Confirm and apply.

UserLock creates the database if needed, then switches to it immediately.

Note
  • No change is applied before you click Confirm and apply.

  • The previous database is not modified or deleted.

For more advanced scenarios, see: