User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
MySQL, Clustrix, MariaDB, and MemSQL

Dialects Using These Instructions

MySQL, Clustrix, MariaDB, and MemSQL share the database setup requirements described on this page.

Encrypting Network Traffic

Looker strongly recommends encrypting network traffic between the Looker application and your database. Consider one of the options described here.

If you’re interested in using SSL encryption, see this MySQL documentation page.

Users and Security

To create and grant the required access to the Looker user, follow the instructions in the section appropriate to your database dialect and version:

MySQL 8.0:

  1. Start up MySQL server with the flag --default-auth=mysql_native_password.

  2. Issue the following statements, replacing some_password_here with a unique, secure password:

    CREATE USER looker IDENTIFIED WITH mysql_native_password BY 'some_password_here'; GRANT SELECT ON database_name.* TO 'looker'@'%';

MySQL 5.7.x and Earlier, Clustrix, MariaDB, and MemSQL:

Issue the following statements, replacing some_password_here with a unique, secure password:

CREATE USER looker; SET PASSWORD FOR looker = PASSWORD ('some_password_here'); GRANT SELECT ON database_name.* TO 'looker'@'%';

Temp Schema Setup for Persistent Derived Tables

These database dialects support the creation of persistent derived tables (PDTs). This feature can be very useful, and we recommend enabling it when possible.

To enable PDTs, you need to configure a temp schema. The following commands show an example of creating a temp database and granting the required privileges to the looker user.

You can specify the name of the temp database in the Temp Database field when creating your database connection. If you don’t specify a temp database name, Looker generates a scratch database named looker_tmp. The commands below use looker_tmp, but if you specified a different temp database name, use your temp database name instead of looker_tmp.

CREATE SCHEMA looker_tmp; GRANT SELECT, INDEX, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES ON looker_tmp.* TO 'looker'@'%';

For MemSQL, or if your database uses GTID-based replication, you must use the create_process LookML parameter to use PDTs, because GTID does not support CREATE TABLE AS SELECT statements.

Alternative Setup for Regular Derived Tables

If you do not want to allow the creation of persistent derived tables, you can still use regular derived tables. To use regular derived tables, you still need to add certain permissions to a schema called looker_tmp. However, the looker_tmp schema does not actually need to exist in your database!

GRANT SELECT, INDEX, INSERT, DROP, CREATE TEMPORARY TABLES ON looker_tmp.* TO 'looker'@'%'; -- Note that the looker_tmp schema does not need to actually exist, -- even though these permission grants are still needed

Feature Support

Looker’s ability to provide some features depends on whether the database dialect can support them.

In the current Looker release, MySQL supports the following Looker features:

In the current Looker release, Clustrix supports the following Looker features:

In the current Looker release, MariaDB supports the following Looker features:

In the current Looker release, MemSQL supports the following Looker features:

Next Steps

After completing the database configuration, you can connect to the database from Looker using these directions.

When creating connections, be sure to use the correct database dialect name. Although the database configuration instructions are the same for MySQL, Clustrix, MariaDB, and MemSQL be sure to pick your specific dialect from the Dialect drop-down on the Connections page, which is described next.

Top