> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/installing-system-tables-mariadb-install-db/installing-system-tables-on-unix.md).

# Installing System Tables on Unix

`mariadb-install-db` initializes the MariaDB data directory and creates the [system tables](/docs/server/reference/system-tables.md) in the [mysql](/docs/server/reference/system-tables/the-mysql-database-tables.md) database, if they do not exist. MariaDB uses these tables to manage [privileges](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#privilege-levels), [roles](/docs/server/security/user-account-management/roles.md), and [plugins](/docs/server/reference/plugins.md). It also uses them to provide the data for the [help](/docs/server/reference/sql-statements/administrative-sql-statements/help-command.md) command in the [mariadb](/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client.md) client.

[mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md) works by starting MariaDB Server's `mysqld` process in [--bootstrap](/docs/server/server-management/starting-and-stopping-mariadb/mariadbd-options.md) mode and sending commands to create the [system tables](/docs/server/reference/system-tables.md) and their content.

There is a version specifically for Windows, [mysql\_install\_db.exe](/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/installing-system-tables-mariadb-install-db/mariadb-install-db-exe.md).

To invoke `mariadb-install-db`, use the following syntax:

```bash
mariadb-install-db --user=mysql
```

For the options supported by [mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md), see [mariadb-install-db: Options](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md#options).

For the option groups read by [mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md), see [mariadb-install-db: Option Groups](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md#option-groups).

See [mariadb-install-db: Installing System Tables](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md#installing-system-tables) for information on the installation process.

See [mariadb-install-db: Troubleshooting Issues](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md#troubleshooting-issues) for information on how to troubleshoot the installation process.

## See Also

* [mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md)
* The Windows version of `mariadb-install-db`: [mysql\_install\_db.exe](/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/installing-system-tables-mariadb-install-db/mariadb-install-db-exe.md)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
