Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Netzwerk-Datenverkehr verschlüsseln
Es empfiehlt sich, den Netzwerkverkehr zwischen der Looker-Anwendung und Ihrer Datenbank zu verschlüsseln. Prüfen Sie eine der Optionen, die auf der Dokumentationsseite Sicheren Datenbankzugriff ermöglichen beschrieben werden.
Benutzer und Sicherheit
Damit Looker Aktionen in Ihrer Datenbank ausführen kann, muss es ein Nutzerkonto in Ihrer Datenbank haben.
So konfigurieren Sie einen Datenbanknutzer für Looker:
Gewähren Sie dem Datenbanknutzer SELECT-Berechtigungen für die Datenbank, die von Looker abgefragt werden soll. Ersetzen Sie database_name durch den Namen Ihrer Datenbank.
So erstellen Sie die Verbindung von Looker zu Ihrer Datenbank:
Wählen Sie in Looker im Bereich Admin die Option Verbindungen aus und klicken Sie dann auf Verbindung hinzufügen.
Wählen Sie im Drop-down-Menü Dialekt die Option Google Cloud SQL aus.
Geben Sie die Verbindungsdetails ein. Der Großteil der Einstellungen gilt für die meisten Datenbankdialekte. Weitere Informationen finden Sie auf der Dokumentationsseite Looker mit Ihrer Datenbank verbinden. Einige der Einstellungen werden im Folgenden beschrieben:
Host: Der Datenbank-Hostname, der für die Verbindung zur Google Cloud SQL for MySQL-Datenbank verwendet wird. Verwenden Sie für einen SSH-Tunnel localhost.
Port: Der Port, der für die Verbindung zur Google Cloud SQL for MySQL-Datenbank verwendet wird.
Datenbank: Der Name der Google Cloud SQL for MySQL-Datenbankinstanz.
Nutzername: Der Nutzername des Kontos, mit dem sich Looker in Google Cloud SQL for MySQL anmeldet.
Passwort: Das Passwort des Kontos, mit dem sich Looker in Google Cloud SQL for MySQL anmeldet.
SSL: Wenn diese Option aktiviert ist, wird eine SSL-Verbindung hergestellt. SSL-Verbindungen zu Google Cloud SQL for MySQL werden jedoch standardmäßig nicht unterstützt.
SSL überprüfen: Wenn diese Option aktiviert ist, wird die SSL-Überprüfung erzwungen. SSL-Verbindungen zu Google Cloud werden jedoch standardmäßig nicht unterstützt.
Klicken Sie auf Test, um zu prüfen, ob die Verbindung erfolgreich hergestellt wurde. Informationen zur Fehlerbehebung finden Sie auf der Dokumentationsseite Datenbankkonnektivität testen.
Klicken Sie auf Verbinden, um diese Einstellungen zu speichern.
Unterstützung von PAT
Google Cloud SQL for MySQL unterstützt keine CREATE TABLE AS SELECT-Anweisungen. Daher müssen Sie mit dem LookML-Parameter create_process persistente abgeleitete Tabellen (PDTs) definieren.
Funktionsunterstützung
Damit Looker einige Funktionen unterstützen kann, müssen diese auch von Ihrem Datenbankdialekt unterstützt werden.
Google Cloud SQL unterstützt ab Looker 25.12 die folgenden Funktionen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-25 (UTC)."],[],[],null,["# Google Cloud SQL for MySQL\n\n| **Note:** [Looker (Google Cloud core)](/looker/docs/looker-core-overview) instances support [Application Default Credentials (ADC)](/docs/authentication/application-default-credentials) as a method of authentication for Google Cloud SQL for MySQL. See the [Looker (Google Cloud core) documentation](/looker/docs/looker-core-dialects#using-application-default-credentials-to-connect-to-a-database) for more information.\n\nEncrypting network traffic\n--------------------------\n\nIt is a best practice to encrypt network traffic between the Looker application and your database. Consider one of the options described on the [Enabling secure database access](/looker/docs/enabling-secure-db-access) documentation page.\n\nUsers and security\n------------------\n\nTo perform actions on your database, Looker needs to have a user account on your database.\n| **Note:** Skip this procedure if you are on a Looker (Google Cloud core) instance and you want to use Application Default Credentials to authenticate into your database. You will instead use an existing IAM principal account. See the [Connecting Looker (Google Cloud core) to your database](/looker/docs/looker-core-dialects#using-application-default-credentials-to-connect-to-a-database) documentation page for the procedure.\n\nTo configure a database user for Looker to use, perform the following steps on your database:\n\n1. Create a database user.\n\n CREATE USER \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eUSERNAME\u003c/span\u003e\u003c/var\u003e;\n SET PASSWORD FOR \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eUSERNAME\u003c/span\u003e\u003c/var\u003e = PASSWORD ('\u003cvar translate=\"no\"\u003ePASSWORD\u003c/var\u003e');\n\n2. Grant `SELECT` privileges to the database user on the database that you want Looker to query. Replace `database_name` with the name of your database.\n\n GRANT SELECT ON \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eDATABASE_NAME\u003c/span\u003e\u003c/var\u003e.* TO \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eUSERNAME\u003c/span\u003e\u003c/var\u003e;\n\nOnce you create the database user, you can enter the database user account credentials in the [**Username**](#username) and [**Password**](#password) fields of the Looker UI when you [create the Looker connection to your database](#creating-the-connection-to-your-database).\n\nCreating the Looker connection to your database\n-----------------------------------------------\n\nTo create the connection from Looker to your database, follow these steps:\n\n1. In the **Admin** section of Looker, select **Connections** , and then click **Add Connection**.\n2. From the **Dialect** drop-down menu, select **Google Cloud SQL**.\n3. Fill out the connection details. The majority of the settings are common to most database dialects. See the [Connecting Looker to your database](/looker/docs/connecting-to-your-db) documentation page for information. Some of the settings are described next:\n\n - **Host** : The database hostname that is used to connect to the Google Cloud SQL for MySQL database. For an SSH tunnel, use `localhost`.\n - **Port**: The port used that is to connect to the Google Cloud SQL for MySQL database.\n - **Database**: The name of the Google Cloud SQL for MySQL database instance.\n - **Username** : The username of the account that Looker will use to sign in to Google Cloud SQL for MySQL.\n\n | **Note:** [Looker (Google Cloud core)](/looker/docs/looker-core-overview) instances also support [Application Default Credentials (ADC)](/docs/authentication/application-default-credentials) as a method of authentication for Google Cloud SQL for MySQL. See the [Looker (Google Cloud core) documentation](/looker/docs/looker-core-dialects#using-application-default-credentials-to-connect-to-a-database) for more information.\n - **Password** : The password of the account that Looker will use to sign in to Google Cloud SQL for MySQL.\n\n - **Additional JDBC parameters**: Additional JDBC parameters (optional).\n\n - **SSL**: If checked, enables an SSL connection; however, SSL connections to Google Cloud SQL for MySQL are not supported by default.\n\n | **Note:** Google Cloud SQL for MySQL requires additional steps for configuring SSL connections; see [Configuring SSL/TLS certificates](/sql/docs/mysql/configure-ssl-instance). Google Cloud SQL for MySQL 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](/looker/docs/customer-hosted-installation-steps) that have access to the Looker server.\n |\n | \u003cbr /\u003e\n |\n | \u003cbr /\u003e\n |\n | Because of this requirement, a better alternative to SSL is to connect Looker to Google Cloud SQL for MySQL through a [Cloud SQL for MySQL Proxy](/sql/docs/mysql/sql-proxy).\n - **Verify SSL**: If checked, SSL verification is enforced. However, SSL connections to Google Cloud are not supported by default.\n\n4. To verify that the connection is successful, click **Test** . See the [Testing database connectivity](/looker/docs/testing-db-connectivity) documentation page for troubleshooting information.\n\n5. To save these settings, click **Connect**.\n\nPDT support\n-----------\n\nGoogle Cloud SQL for MySQL does not support `CREATE TABLE AS SELECT` statements, so you must use the [`create_process`](/looker/docs/reference/param-view-create-process) LookML parameter to define PDTs.\n\nFeature support\n---------------\n\nFor Looker to support some features, your database dialect must also support them.\n\nGoogle Cloud SQL supports the following features as of Looker 25.14:\n\nNext steps\n----------\n\nAfter you have created your database connection, [set authentication options](/looker/docs/getting-started-with-users)."]]