Create a connection to MySQL

Follow these steps to create a connection to MySQL:

  1. Open the Visualization page in the console.

  2. Select your workbook or click Create workbook to make a new one.

  3. Click CreateConnection in the upper-right corner of your workbook page.

  4. Select MySQL. You'll see the following page:

    mysql-connection-interface

  5. Specify the connection parameters:

    • Hostname. IP address or the domain name (FQDN) of your host.

    • Port (by default, 3306).

    • Path to database. Provide the path to your MySQL database within the host specified above. Usually, it's the database name.

    • Username and Password for your database.

    • Cache TTL in seconds. Specifies how long to store cache. You can keep the Default value or select Customized to set this value manually.

    • Raw SQL level:

      • Forbid is the default setting. It handles all SQL queries automatically.

      • Allow subselects in datasets gives access to manual operations with SQL queries and subqueries. Use with caution and only if necessary.

      • Allow subselects in datasets and queries from charts allows you to use your connection to create a QL chart.

  6. Specify the Advanced settings, select a mode for Specifying collate in a request:

    • Auto: Visualization automatically determines whether to enable the en_US locale.

    • On: The en_US locale is specified for individual expressions in a query.

    • Off: Visualization only uses the existing parameters of the DB locale.

  7. Click Check connection:

    • If your connection is operational, you'll see a green icon.

    • If there is a problem, a red icon will appear. You'll also see a popup message with a Details button to check service information about the error.

  8. Click Create connection.

  9. Name your connection and click Create.

See also