Users and Security
First, create a database user that you will use to 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'd like Looker to be able to query:
CREATE USER looker;
SET PASSWORD FOR looker = PASSWORD ('some_password_here');
GRANT SELECT ON database_name.* TO looker;
Connect the Database
Login to your Looker instance.
Browse to Admin → Database Connections → New Database Connections and complete the form to setup a new database connection.
You will need the following information about your database:
- Database Type: Select Google Cloud SQL (3.38+) or MySQL (pre 3.38) as the Database type for Google Cloud SQL
- Host (set to “localhost” if using an SSH tunnel)
Note: Since Google Cloud SQL now only supports GTID replication, Looker no longer supports PDTs on this dialect. You can still create non-persistent derived tables.
Once you are finished creating connections you can proceed on to setting authentication options.
Looker’s ability to provide some features depends on the database dialect’s ability to support that functionality. In the current Looker release, Google Cloud SQL supports the following Looker features: