---
locale: "en"
updated_at: "2026-03-24T11:25:01.775Z"
canonical: "https://www.isdecisions.com/en/userlock/docs/guides/database/define-a-production-database"
---

# Define a production database

Configure the database used by UserLock.

## Introduction

By default, UserLock ships with a lightweight database that is not designed for production.
To ensure performance and reliability, you should connect UserLock to a production-ready database.

Before following this guide:

- Check the [Database reference](/userlock/docs/reference/core-concepts/database-architecture) for **supported systems and prerequisites**.
- Review the [Server settings ▸ Database](/userlock/docs/reference/server-settings/database) for details about each **interface option** you will use in the steps below.

## Steps

To connect UserLock to a new production database:

1. **Prepare the database**
  - Create an empty database in your SQL Server or MySQL environment.
  - See the [Database reference](/userlock/docs/reference/core-concepts/database-architecture) for compatibility details.
2. **Open the database settings**
  - In the UserLock console, click the ⚙ wheel (top right).
  - In the left menu, select **Database**.
3. **Configure the connection**
  - Select the appropriate **Database type**.
  - Enter the connection details (server, authentication, database).
  - Use an account with rights to read, write and create tables or if the Windows authentication is selected make sure that the [Service impersonation account](/userlock/docs/reference/server-settings/service#service-impersonation) has these rights.
  - For a description of each field, see the [Server settings ▸ Database](/userlock/docs/reference/server-settings/database) reference.
    ![](https://a.storyblok.com/f/122374/1227x827/a57a61cc38/server-settings-database-connection.png)
4. **Validate and save**
  - Click **Test connection**.
  - If successful, click **Save**.

> **Note**
>
> 👉 Once saved, UserLock creates the required tables and immediately switches to the new database.
> 
> 
> ⚠️ Since ODBC Driver 18 for SQL Server, the server certificate needs to be validated by default for encryption.
> To bypass certificate validation and avoid connection issues, you can add the following option to the connection string:
> `TrustServerCertificate=yes`
> Alternatively, you can follow the [Microsoft SQL Server documentation](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-sql-server-encryption?view=sql-server-ver17) to properly configure your SQL Server installation.

## Next steps

This guide shows the simplest way to point UserLock to a new production database.

For more advanced scenarios, see:

- [Install and configure SQL Express](/userlock/docs/guides/database/install-and-configure-sql-express): for administrators who need to deploy SQL Express.
- [Migrate from MS Access to SQL Server](/userlock/docs/guides/database/transfer-records-from-ms-access-to-sql-express): if your current production data is still in Access and must be preserved.
- [Migrate between SQL Server instances](/userlock/docs/guides/database/migrate-another-sql-server-database): switch databases during infrastructure changes.
