MySQL, MariaDB, and SingleStore

Dialects that use these instructions

MySQL, MariaDB, and SingleStore (formerly MemSQL) share the database setup requirements described on this page.

Encrypting network traffic

It is a best practice to encrypt network traffic between the Looker application and your database. Consider one of the options that are described on theEnabling secure database access documentation page.

If you're interested in using SSL encryption, see thisMySQL 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.X:

Note: The Looker MySQL 8.0.X dialect option is implemented with the patch version 8.0.12+ because of aMySQL deprecation in implicit sorting in theGROUP BY clause. This affects Looker subtotals for MySQL versions 8.0.0 through 8.0.11, causing SQL generation errors. Looker suggests upgrading any MySQL 8.0.X databases to at least 8.0.12 to fully integrate. However, earlier MySQL versions will still work, aside fromsubtotals.

In MySQL 8.0.X, the default authentication plugin iscaching_sha2_password. Looker uses themysql_native_password pluginto attempt to authenticate to MySQL databases through the JDBC driver. For this version of MySQL to work properly,you must take the following additional steps:

  1. Configure the MySQL database to use themysql_native_password plugin. This can be done in multiple ways, and will depend on how your MySQL 8 database is deployed and what type of access you have to the configuration:

    • Start the process with the flag--default-auth=mysql_native_password

    • Set the property in themy.cnf configuration file:

    [mysqld]default-authentication-plugin=mysql_native_password
    • If your database instance is hosted through AWS RDS, set thedefault_authentication_plugin parameter through an RDS Parameter Group that is applied to this database instance.
  2. Run the following commands, replacingsome_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, MariaDB, and SingleStore:

Run the following commands, replacingsome_password_here with a unique, secure password:

CREATEUSERlooker;SETPASSWORDFORlooker=PASSWORD('some_password_here');GRANTSELECTONdatabase_name.*TO'looker'@'%';

Temp schema setup for persistent derived tables

These database dialects support the creation ofpersistent 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 thelooker user.

You can specify the name of the temp database in theTemp Database field whencreating your database connection. If you don't specify a temp database name, Looker generates a scratch database namedlooker_tmp. The following commands uselooker_tmp, but if you specified a different temp database name, use your temp database name instead oflooker_tmp.

CREATESCHEMAlooker_tmp;GRANTSELECT,INDEX,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,CREATETEMPORARYTABLESONlooker_tmp.*TO'looker'@'%';

For SingleStore, or if your database uses GTID-based replication, you must use thecreate_process LookML parameter to use PDTs, because GTID does not supportCREATE TABLE AS SELECT statements.

Alternative setup for regular derived tables

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

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

Setting themax_allowed_packet variable

For MySQL, set the MySQLmax_allowed_packet variable to its maximum value, 1073741824, to prevent "SQLException: Packet for query is too large" errors.

Creating the Looker connection to your database

After completing the database configuration, you can connect to the database from Looker. Follow these steps to create the connection from Looker to your database:

  1. In theAdmin section of Looker, selectConnections, and then clickAdd Connection.
  2. From theDialect drop-down menu, select your database dialect name:MySQL,MySQL 8.0.12+,MariaDB,SingleStore, orSingleStore 7+.

    Note: If you are on aLooker (Google Cloud core) instance and you don't see your dialect listed in theDialect drop-down menu, see theLooker (Google Cloud core) documentation to verify that the dialect is supported for Looker (Google Cloud core) instances.
  3. Fill out the connection details. The majority of the settings are common to most database dialects. See theConnecting Looker to your database documentation page for information.

  4. To verify that the connection is successful, clickTest. See theTesting database connectivity documentation page for troubleshooting information.

  5. To save these settings, clickConnect.

Feature support

For Looker to support some features, your database dialect must also support them.

MySQL supports the following features as of Looker 26.2:

FeatureSupported?
Looker (Google Cloud core)
Symmetric aggregates
Derived tables
Persistent SQL derived tables
Persistent native derived tables
Stable views
Query killing
SQL-based pivots
Timezones
SSL
Subtotals
JDBC additional params
Case sensitive
Location type
List type
Percentile
Distinct percentile
SQL Runner Show Processes
SQL Runner Describe Table
SQL Runner Show Indexes
SQL Runner Select 10
SQL Runner Count
SQL Explain
OAuth 2.0 credentials
Context comments
Connection pooling
HLL sketches
Aggregate awareness
Incremental PDTs
Milliseconds
Microseconds
Materialized views
Period-over-period measures
Approximate count distinct

MySQL 8.0.12+ supports the following features as of Looker 26.2:

FeatureSupported?
Looker (Google Cloud core)
Symmetric aggregates
Derived tables
Persistent SQL derived tables
Persistent native derived tables
Stable views
Query killing
SQL-based pivots
Timezones
SSL
Subtotals
JDBC additional params
Case sensitive
Location type
List type
Percentile
Distinct percentile
SQL Runner Show Processes
SQL Runner Describe Table
SQL Runner Show Indexes
SQL Runner Select 10
SQL Runner Count
SQL Explain
OAuth 2.0 credentials
Context comments
Connection pooling
HLL sketches
Aggregate awareness
Incremental PDTs
Milliseconds
Microseconds
Materialized views
Period-over-period measures
Approximate count distinct

MariaDB supports the following features as of Looker 26.2:

FeatureSupported?
Looker (Google Cloud core)
Symmetric aggregates
Derived tables
Persistent SQL derived tables
Persistent native derived tables
Stable views
Query killing
SQL-based pivots
Timezones
SSL
Subtotals
JDBC additional params
Case sensitive
Location type
List type
Percentile
Distinct percentile
SQL Runner Show Processes
SQL Runner Describe Table
SQL Runner Show Indexes
SQL Runner Select 10
SQL Runner Count
SQL Explain
OAuth 2.0 credentials
Context comments
Connection pooling
HLL sketches
Aggregate awareness
Incremental PDTs
Milliseconds
Microseconds
Materialized views
Period-over-period measures
Approximate count distinct

SingleStore supports the following features as of Looker 26.2:

FeatureSupported?
Looker (Google Cloud core)
Symmetric aggregates
Derived tables
Persistent SQL derived tables
Persistent native derived tables
Stable views
Query killing
SQL-based pivots
Timezones
SSL
Subtotals
JDBC additional params
Case sensitive
Location type
List type
Percentile
Distinct percentile
SQL Runner Show Processes
SQL Runner Describe Table
SQL Runner Show Indexes
SQL Runner Select 10
SQL Runner Count
SQL Explain
OAuth 2.0 credentials
Context comments
Connection pooling
HLL sketches
Aggregate awareness
Incremental PDTs
Milliseconds
Microseconds
Materialized views
Period-over-period measures
Approximate count distinct

SingleStore 7+ supports the following features as of Looker 26.2:

FeatureSupported?
Looker (Google Cloud core)
Symmetric aggregates
Derived tables
Persistent SQL derived tables
Persistent native derived tables
Stable views
Query killing
SQL-based pivots
Timezones
SSL
Subtotals
JDBC additional params
Case sensitive
Location type
List type
Percentile
Distinct percentile
SQL Runner Show Processes
SQL Runner Describe Table
SQL Runner Show Indexes
SQL Runner Select 10
SQL Runner Count
SQL Explain
OAuth 2.0 credentials
Context comments
Connection pooling
HLL sketches
Aggregate awareness
Incremental PDTs
Milliseconds
Microseconds
Materialized views
Period-over-period measures
Approximate count distinct

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.