# Starting with Catalogs

{% hint style="info" %}
Catalogs are planned for an upcoming release, and don't yet appear in any current releases.
{% endhint %}

## Background

[mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md) 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.

When used with the `--catalog` options it will initialize MariaDB server to use catalogs.\
The [mariadbd server](/docs/server/server-management/starting-and-stopping-mariadb/mariadbd.md) will automatically discover if catalogs are used or not.

Note that **one cannot change** a 'normal server' to a server with catalogs or a server with catalogs to\
a 'normal server'. In the future we will add tools that will allow one to easily move an existing server inside a catalog or move an server inside a catalog to a standalone server.

## Initializing a New Server with Catalog Support

To initialize a server with 4 catalogs (the `def` catalog, that holds the catalog root user (CRU) is automatically created):

```bash
mariadb_install_db --catalogs="cat1 cat2 cat3" --datadir=/my/data/
```

The above will create a directory `/my/data` and the 4 directories under it, one for each catalog.

## Adding More Catalogs to a Running Server

### Creating Catalogs with CREATE CATALOG

One can create a new catalog with [CREATE CATALOG catalog\_name](/docs/server/security/user-account-management/catalogs/create-catalog.md)

### Creating Catalogs with mariadb\_install\_db

When adding more catalogs to an existing server, `mariadb_install_db` will start the [mariadb client](/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client.md) to execute the needed commands on the running server. This is why one has to supply user and password to `mariadb_install_db`.

```bash
mariadb_install_db --catalogs="cat4 cat5 cat6" --datadir=/my/data --catalog-user=monty --catalog-password
```

One benefit of using `mariadb_install_db` is that it's possible to create many catalogs with one command.

## See Also

* [CREATE CATALOG](/docs/server/security/user-account-management/catalogs/create-catalog.md)
* [DROP CATALOG](/docs/server/security/user-account-management/catalogs/drop-catalog.md)
* [mariadb-install-db](/docs/server/clients-and-utilities/deployment-tools/mariadb-install-db.md)

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/security/user-account-management/catalogs/starting-with-catalogs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
