Requirements
To follow the steps in this guide, youâll need:- Organization Admin permissions in Omni
- Permissions in MySQL that allow you to create database users
Setup
1
Create a database user for Omni
In your MySQL database, run the following command to create a database user for Omni:Next, run the following command to grant the Omni user access to the database:
Create Omni user
Grant SELECT permissions to Omni user
2
Set up a table upload schema
import UploadSchemaCallout from â/snippets/connect-data/upload-schema-callout.mdxâ;In this step, youâll create a dedicated schema to use for table uploads. This schema canât be used for other modeled tables.
- Create the schema in MySQL.
-
Run the following commands to grant the Omni user the required privileges:
Grant Omni user permissions to upload schema
3
Allowlist Omni's IP addresses
If access to the MySQL database is limited by IP address, youâll need to add Omniâs IPs to the allowlist before you create the database connection.Omniâs IP addresses can be found on an individual connectionâs page, accessed by navigating to Settings > Connections and clicking a connection.
4
Create the connection in Omni
- In Omni, click Settings > Connections.
- Click the MySQL option.
-
On the connection setup page, fill in the connection details:
Name Required? Description Display Name Yes A user-friendly name for the connection, which will be used throughout Omni Host Yes The hostname or IP address of the database server Port Yes The port number for the database connection. Defaults to 3306.Default Schema Yes The default schema to use for queries Include Databases No A comma-separated list of databases to include in the connection Offloaded Schemas No A comma-separated list of schemas to include in the connection, which will only load on demand. This setting is good for very large schemas or dbt dev schemas. Schema for Table Uploads No The name of the schema to use for table (CSV) uploads. If left blank, you can upload tables but they wonât be pushed to the database or be available for use in joins. Username Yes The username for database authentication Password Yes The password for database authentication Database Timezone Yes The timezone used by the database Query Timezone Yes The timezone to use for Omni queries. If a timezone is specified, data will be converted from the Database timezone to the selected timezone. Allow User-Specific Timezones No Allow users to override the connection timezone with their own when querying Query Timeout No Maximum time in seconds before a query times out - When finished, click Create connection.
Whatâs next?
Now that your MySQL is set up, you can:- Configure user permissions, schema refreshes, environments and timezone settings
- Learn how Omni generates the model associated with the connection