How to Connect Looker Studio to Database

Cody Schneider7 min read

Connecting your live database directly to Looker Studio (formerly Google Data Studio) turns your raw data into a powerful engine for interactive dashboards and reports. This guide walks you through the essential steps for connecting popular databases, covers what you need to have ready beforehand, and offers solutions for common connection hurdles.

Before You Connect: A Pre-Flight Checklist

Jumping straight into Looker Studio without the right credentials is a recipe for frustration. Before you do anything else, make sure you have the following information and access confirmed. This simple prep work will save you a ton of time.

1. Your Database Credentials

This is the basic information needed to tell Looker Studio where your database is and how to log in. You'll need:

  • Hostname or IP Address: The server address where your database is hosted (e.g., db.yourcompany.com or 123.45.67.89).
  • Port: The specific port your database uses for connections. Each database type has a default, but yours might be different. Standard defaults include:
  • Database Name: The name of the specific database you want to connect to.
  • Username & Password: The login credentials for a database user account. For security, it's best practice to create a dedicated, read-only user for Looker Studio. This user only needs SELECT permissions on the tables you want to visualize, preventing any accidental changes to your data.

2. Whitelist The Looker Studio IP Addresses

This is the most common reason connections fail. For Looker Studio's cloud service to reach your privately hosted database, your server's firewall must be configured to allow incoming traffic from Google's specific IP addresses. If you don't do this, your server will simply reject the connection attempt, and you'll get a timeout error.

You or your IT administrator will need to add the following IP ranges to your database server's firewall allowlist:

142.251.74.0/23
74.125.0.0/16

Note: This applies to databases you host yourself or on a cloud provider like AWS RDS or DigitalOcean. If you're using a Google Cloud database like BigQuery or Cloud SQL, you can often use more secure connection methods that don't require public IP whitelisting.

3. (Optional but Recommended) Enable SSL

To encrypt the data traveling between your database and Looker Studio, you should use an SSL connection. It protects your data from being intercepted and read. To do this, you'll need SSL enabled on your database server and may need to provide your client key and certificate files in the Looker Studio connection settings.

How to Connect Your Database: A Step-by-Step Guide

Once you've completed the pre-flight checklist, you're ready to create the connection. We'll walk through the process using MySQL as our primary example, but the steps are nearly identical for PostgreSQL and Microsoft SQL Server.

Step 1: Create a New Data Source

Log in to Looker Studio. You can create a new data source in two main ways:

  • From the homepage, click the Create button in the top left and select Data Source.
  • Inside a report, click Add data from the toolbar or navigate to Resource > Manage added data sources and click ADD A DATA SOURCE.

This will bring you to the connector gallery, which displays all the official "Google Connectors" and partner-built connectors available.

Step 2: Choose Your Database Connector

In the connector gallery search bar, type the name of your database (e.g., "MySQL", "PostgreSQL", or "Microsoft SQL Server"). The official Google-built connectors are usually the best choice for stability and support. Click on the appropriate one.

Step 3: Enter Your Connection Details

Now, you'll see a form asking for the credentials you gathered earlier.

  • Fill in the Host Name, Port, Database, Username, and Password fields.
  • If you are using SSL encryption, check the Enable SSL box and upload your certificate files if required.

Once everything is filled in, click the blue AUTHENTICATE button.

Step 4: Select Your Data

If the authentication is successful, Looker Studio will connect to your database and show you options for what data to pull in.

  • Tables: This lists all the tables your provided user has access to. This is the most common choice. Simply select the table you want to work with.
  • Custom Query: This is a powerful feature that allows you to write your own SQL query. This is great for pre-joining tables, filtering data at the source, or performing calculations before the data ever reaches Looker Studio. This can dramatically improve dashboard performance.

For a custom query, you might write something like this to join sales data with customer information:

SELECT
  s.order_id,
  s.order_date,
  s.amount,
  c.customer_name,
  c.region
FROM sales s
JOIN customers c ON s.customer_id = c.customer_id
WHERE s.order_date >= '2023-01-01'

After choosing a table or writing your query, click the CONNECT button in the top right corner.

Step 5: Review and Configure Your Data Fields

You're almost there! Looker Studio will now show you a schema view of all the fields (columns) from your table or query. This is your chance to manage your data types before building a report.

Here you can:

  • Rename fields: Change a name like cust_first_name to a more readable "Customer First Name."
  • Change data types: Ensure dates are recognized as Date types, numbers as Number or Currency, and geographical locations as City or Country for map visualizations.
  • Set default aggregations: Specify whether a numerical field should default to Sum(), Average(), Count(), etc.

Once you are happy with the schema, click CREATE REPORT or EXPLORE to start building your dashboard.

The Easy Way: Connecting with BigQuery

If your analytics data lives in Google BigQuery, the connection process is significantly simpler because they both live in the Google Cloud ecosystem. There’s no firewall whitelisting or public IP exposure required.

  1. Select the BigQuery connector from the gallery.
  2. You'll be presented with a navigation pane showing your available Projects, Datasets, and Tables.
  3. Simply drill down to find the table you need and select it. Alternatively, use the CUSTOM QUERY option to write your own Standard SQL query against projects you have access to.
  4. Click Connect, and you’re ready to go. The schema review screen is the same, but the setup is a matter of clicks, not networking configurations.

Troubleshooting Common Connection Issues

Even with careful preparation, you might run into an error. Here are the most frequent problems and how to solve them.

Error: "Sorry, we could not reach the server." (or Connection Timed Out)

This almost always means there is a firewall blocking the connection. Double-check that your server's firewall has correctly whitelisted Looker Studio’s IP addresses and that the rule is active.

Error: "Access Denied"

This is a credential issue. Verify every character of your username, password, hostname, and database name. A simple typo is often the culprit. If they look correct, confirm that the database user has permission to connect from a remote host (some users are configured to only allow connections from localhost).

Dashboard is Loading Very Slowly

This is a performance issue, not a connection one. The problem could be:

  • A heavy query: If you’re pulling in millions of rows without any filtering, your dashboard will be slow. Use the Custom Query feature to be more specific, add WHERE clauses, and only pull the columns you actually need.
  • An underpowered database: Your database server might not have enough resources (CPU, RAM) to handle the analytics queries from Looker Studio efficiently on top of its normal workload.
  • Data size: For massive datasets, it’s often better to aggregate the data into summary tables first (materialized views) and connect Looker Studio to those instead of the raw data table.

Final Thoughts

Connecting a live database transforms Looker Studio from a simple tool into a real-time business intelligence hub. The process is straightforward: have the right credentials handy, configure your firewall, pick the right connector, and shape your data schema. The custom query option, in particular, unleashes new levels of performance and flexibility for your dashboards.

If you're looking for a faster way to get from raw data to actionable insights without managing firewall rules or learning a complex BI tool, you might find our approach useful. At Graphed we use an AI-native approach to analytics. We skip the complicated setup by providing one-click integrations for popular platforms and by accepting an easy workaround via a Google Sheet, then let you use plain English to build dashboards and ask questions. Instead of clicking and dragging dimensions and metrics, you just describe what you want to see, and our AI builds the report for you instantly.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.