Create a secure JDBC connection so Looker can query your MariaDB schemas.
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
.
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.
CREATE USER 'looker'@'%' IDENTIFIED BY 'StrongP@ss!';
GRANT SELECT ON ecommerce.* TO 'looker'@'%';
Admin → Connections → New. Select “MariaDB”. Fill host, port, database, user, password, and tick “SSL”. Add JDBC string options if needed.
jdbc:mariadb://db.prod.local:3306/ecommerce?useSSL=true&serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL
Click “Test” in Looker. Successful ping plus SELECT 1
indicates network and auth are correct. Run the query below to confirm schema visibility.
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'ecommerce'
ORDER BY table_name;
Use private networking or SSH tunnel, rotate passwords, restrict to read-only, and enable slow-query logging for optimization.
Incorrect SSL parameters and lack of time-zone settings cause frequent failures. See fixes below.
Yes. Select “MariaDB” when creating the connection; Looker bundles the required JDBC driver.
Absolutely. Provide bastion host details in the connection form to keep MariaDB off the public internet.
Grant only SELECT and use MariaDB’s max_execution_time
or Looker PDT quotas to cap resource use.