> 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/security/user-account-management/catalogs/starting-with-catalogs.md).

# 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" %}
