Users and Security
Create a database user that can connect Cloud SQL to Looker. In the following commands, change
some_password_here to a unique, secure password, and grant
SELECT privileges to the database you want Looker to query:
Connect the Database
In the Admin section of Looker, navigate to the Connections page and click New Connection. Looker displays this page:
Fill in the following fields:
- Dialect: Google Cloud SQL.
- Host: The database hostname used to connect to the Google Cloud SQL database. For an SSH tunnel, use
- Port: The port used to connect to the Google Cloud SQL database.
- Database: The name of the Google Cloud SQL database instance.
- Username: The username of the account Looker will use to log in to Google Cloud SQL.
- Password: The password of the account Looker will use to log in to Google Cloud SQL.
- Additional Params: Additional JDBC Parameters (optional).
SSL: If checked, enables an SSL connection; however, SSL connections to Google Cloud SQL are not supported by default.
Google Cloud SQL requires additional steps for configuring SSL connections; see Configuring SSL/TLS certificates. Google Cloud SQL creates a server certificate on the creation of each instance, so the custom certificate must be installed on the Looker server for successful SSL connections. This option is available only for customer-hosted Looker deployments that have access to the Looker server.
Because of this requirement, a better alternative to SSL is to connect Looker to Google Cloud SQL through a Cloud SQL Proxy and an SSH tunnel. For assistance, open a support request in Looker’s Help Center by clicking Contact Us.
Verify SSL: If checked, SSL verification is enforced. However, SSL connections to Google Cloud are not supported by default.
Google Cloud SQL does not support
CREATE TABLE AS SELECT statements, so you must use the
create_process LookML parameter to define PDTs.
For Looker to support some features, your database dialect must also support them.
In Looker 21.0, Google Cloud SQL supports the following Looker features:
Once you are finished creating your database connection, you can proceed to setting authentication options.