How to Connect MariaDB to Looker in PostgreSQL

Galaxy Glossary

How do I connect MariaDB to Looker?

Create a secure JDBC connection so Looker can query your MariaDB schemas.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

What parameters does Looker require?

Looker needs host, port (3306), database, username, password, SSL mode, and optional JDBC parameters such as zeroDateTimeBehavior or useSSL=true. Supply these exactly as they appear in MariaDB’s my.cnf.

How do I prepare MariaDB for Looker access?

Create a dedicated, read-only user and grant it the minimum schema privileges. Expose TCP 3306 only to Looker’s IP range and enforce TLS.

Step 1 — Create the Looker user

CREATE USER 'looker'@'%' IDENTIFIED BY 'StrongP@ss!';

Step 2 — Grant limited rights

GRANT SELECT ON ecommerce.* TO 'looker'@'%';

How do I add a connection inside Looker?

Admin → Connections → New. Select “MariaDB”. Fill host, port, database, user, password, and tick “SSL”. Add JDBC string options if needed.

Which JDBC string should I use?

jdbc:mariadb://db.prod.local:3306/ecommerce?useSSL=true&serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL

How do I test the connection?

Click “Test” in Looker. Successful ping plus SELECT 1 indicates network and auth are correct. Run the query below to confirm schema visibility.

Example SQL to verify ecommerce tables

SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'ecommerce'
ORDER BY table_name;

Best practices for production

Use private networking or SSH tunnel, rotate passwords, restrict to read-only, and enable slow-query logging for optimization.

Common mistakes when connecting MariaDB to Looker

Incorrect SSL parameters and lack of time-zone settings cause frequent failures. See fixes below.

Why How to Connect MariaDB to Looker in PostgreSQL is important

How to Connect MariaDB to Looker in PostgreSQL Example Usage


-- Check top-spending customers last 30 days
SELECT c.id,
       c.name,
       SUM(o.total_amount) AS lifetime_value
FROM Customers c
JOIN Orders o ON o.customer_id = c.id
WHERE o.order_date >= CURRENT_DATE - INTERVAL 30 DAY
GROUP BY c.id, c.name
ORDER BY lifetime_value DESC
LIMIT 10;

How to Connect MariaDB to Looker in PostgreSQL Syntax


jdbc:mariadb://<HOST>:<PORT>/<DATABASE>?user=<USER>&password=<PASSWORD>&useSSL=<true|false>&serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL

Common Mistakes

Frequently Asked Questions (FAQs)

Does Looker support MariaDB out of the box?

Yes. Select “MariaDB” when creating the connection; Looker bundles the required JDBC driver.

Can I use SSH tunneling?

Absolutely. Provide bastion host details in the connection form to keep MariaDB off the public internet.

How do I limit queries from Looker?

Grant only SELECT and use MariaDB’s max_execution_time or Looker PDT quotas to cap resource use.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.