All pages
Powered by GitBook
1 of 1

Loading...

CREATE CATALOG

Define external catalogs for data integration. This statement configures connections to remote storage systems, allowing query access to external data sources.

Syntax

Description

Creates a catalog and the mysql, sys and performance_schema schemas inside the catalog.

CREATE CATALOG can only be performed by a user in the def catalog with the CATALOG privilege.

Note that no users are created.

Example

Limitations

The catalog name is limited to 64 characters. All characters must be in the basic ASCII set: (A-Z, a-z, -, _) This limitations is to be able to run catalogs with engines like InnoDB which has limited space in their internal data dictionary.

Pre-Creating Catalog Directories

CREATE CATALOG works even if the catalog directory already exists (as long as there is no mysql sub directory). This is to allow a database administrator to pre-create the catalog directory and mount it to disk volume and optionally add a inside the catalog directory. The directory will not be recognized as a catalog or show up in until the mysql sub directory is created by or .

See Also

  • can be used to create multiple catalogs with a default root user in one go.

This page is licensed: CC BY-SA / Gnu FDL

CREATE CATALOG [IF NOT EXISTS] catalog_name
    [create_specification] ...

create_specification:
    [DEFAULT] CHARACTER SET [=] charset_name
  | [DEFAULT] COLLATE [=] collation_name
  | COMMENT [=] 'comment'
configuration file
SHOW CATALOGS
CREATE CATALOG
mariadb-install-db
marriadb-install-db
DROP CATALOG
CREATE CATALOG cat1;
USE CATALOG cat1;
CREATE USER root@localhost;
GRANT ALL PRIVILEGES ON *.* TO root@localhost;
CREATE DATABASE test;

Catalogs are planned for an upcoming release, and don't yet appear in any current releases.