Connect to MySQL

Sigma supports connections to the MySQL database, for release 8.0 or higher.

Customers

ย Request access to this feature through your Account Representative.

Prospects

ย Request access to this feature through our Sales team.

Requirements

  • Admin privileges in your Sigma organization.
    For more information, see User account types.
  • A MySQL account with READ privileges for the relevant databases and tables.
    If planning to upload CSV data, the account must have WRITE privileges.
  • Sigma supports MySQL version 8.0 and higher.
  • We recommend that you avoid granting excessive permissions to the account you use when connecting to your data store; for example, you do not require SYSADMIN-level access.

Limitations

When connecting from Sigma to a MySQL data store, Sigma does not support the following features and interactions:

  • Connecting to the warehouse through OAuth
  • Input tables
  • Following functions: ArrayAgg, ArrayDistinct,ย Corr, CumulativeCorr, MovingCorr, and Geography functions.
  • MySQL on Azure does not have named timezones by default, so you must load the timezone data into your MySQL database for Sigma to operate properly. Otherwise, you may have an error when setting up a connection. See Microsoft documentation on Populating the time zone tables. This is not an issue for MySQL on AWS or GCP.

Create a connection

Follow these basic steps to create a connection:

  1. Click the user icon at the top right of your screen.ย 
    The user icon is usually composed of your initials.

  2. In the drop-down menu, select Add connection.
    Select the Add connection option

  3. The Add new connections page appears.
    The connections page lists all supported database types, as icons

  4. In the Connection details, specify these:

    Name
    Specify theย Name of the new connection. Sigma displays this name in the connection list.
    Here, we use MySQL connection.
    Type
    Select the tile that represents the data warehouse you use.
    Here, click the MySQL tile.
  5. In the Connection Credentials section, specify the following:

    Host
    The path to your database.
    This can be a URL, or an IP address.
    Port
    The port that Sigma uses to connect to the host.
    The default port for MySQL is 3306
    User
    The username, or account, for connecting to the MySQL data warehouse.
    For example, test.
    Password
    Enter the password that corresponds to the User on the MySQL account.
    Database
    The name of the database you plan to query.
    Enable TLS
    Optional.
    This switch enables or disables TLS encryption on your connection.
    Enabled by default.
    SSH Tunnel
    Optional.
    This switch enables the SSH protocol for secure remote login. For details, see Connect through SSH.
    Disabled by default.
    If on, specify the Tunnel host and Tunnel port fields.
    Tunnel host
    The path to the tunnel server.
    This can be a URL, or an IP address.
    Appears only if SSH Tunnel is on.
    Tunnel port
    The port where the tunnel connects.
    Appears only if SSH Tunnel is on.

    Connection credentials for MySQL

  6. In the Connection Features section, specify the following:

    Host
    The path to your database.
    This can be a URL, or an IP address.
    Port
    The port that Sigma uses to connect to the host.
    The default port for MySQL is 3306
    User
    The username, or account, for connecting to the MySQL data warehouse.
    For example, test.
    Password
    Enter the password that corresponds to the User on the MySQL account.
    Database
    The name of the database you plan to query.
    Enable TLS
    Optional.
    This switch enables or disables TLS encryption on your connection.
    Enabled by default.
    SSH Tunnel
    Optional.
    This switch enables the SSH protocol for secure remote login. For details, see Connect through SSH.
    Disabled by default.
    If on, specify the Tunnel host and Tunnel port fields.
    Tunnel host
    The path to the tunnel server.
    This can be a URL, or an IP address.
    Appears only if SSH Tunnel is on.
    Tunnel port
    The port where the tunnel connects.
    Appears only if SSH Tunnel is on.

    Connection features for MySQL

  7. In the Write Access section, decide if you require write access.
    See Set up write access.

    Enable write access
    Necessary for CSV upload and Materialization.
    Off by default.
    If on, specify the Write schema field.
    Write schema
    The schema where Sigma writes tables.ย 
    Appears only if Enable write access is on.

    Write access for the connection

  8. After you specify all the parameters of the connection, clickย Create.
    Create the connection

  9. After you successfully create your connection, Sigma displays it on the screen.
    New connection created successfully

  10. To verify your connection, clickย Browse Connection, and then explore the visible databases and tables.
    Explore dbs and tables

  11. Click Add Permission to grant data access for users in your organization.
    See Data permissions.
    alt

  12. The new connection also appears in the list of connections you have in your account. New connection in the list of existing connections