MariaDB to Google Sheets, refreshed every hour
Google Sheets has no MariaDB connector, and the Apps Script JDBC service does not list MariaDB. SaturnSQL runs your MariaDB query on a schedule and writes the result into the sheet, from one static IP, with TLS verified. From €19/user/month.
Self-hosted MariaDB or Amazon RDS for MariaDB · No credit card required
SELECT
DATE(created_at) AS day,
COUNT(*) AS orders,
SUM(total) AS revenue
FROM orders
WHERE created_at >= CURDATE() - INTERVAL 30 DAY
GROUP BY day ORDER BY day DESC;| day | orders | revenue | |
| 1 | 2026-10-02 | 1,284 | €61,930 |
| 2 | 2026-10-01 | 1,197 | €57,410 |
| 3 | 2026-09-30 | 1,342 | €64,075 |
| 4 | 2026-09-29 | 1,105 | €52,880 |
Connect MariaDB to Google Sheets in five minutes
No Apps Script to maintain. No CSV to download every Monday.
Connect MariaDB
Pick the MySQL / MariaDB connection type, add a read-only user, and allow SaturnSQL’s static IP on port 3306.
Write the query
Write SQL in the browser editor with schema-aware autocomplete, run it once to check the result, and save it.
Schedule it into a sheet
Choose the spreadsheet and tab, pick hourly, daily, weekly or a cron expression, and run it once to test.
How SaturnSQL connects to MariaDB
Most of what goes wrong with MariaDB to Google Sheets happens before the first row moves: the firewall, the certificate, the database user. Here is how each one works.
Over the MySQL protocol
MariaDB forked from MySQL and kept its client protocol, so in SaturnSQL you choose the MySQL / MariaDB connection type, port 3306 by default, or paste a mysql:// URL. The SQL runs on your MariaDB server, so MariaDB syntax and functions work in scheduled queries exactly as they do in the mariadb client.
From one static IP, or through a bastion
Every connection leaves from 100.49.19.161, so the firewall or security group rule is a single /32 on port 3306 (see static IP address). That address is shared by all SaturnSQL accounts. If your MariaDB sits in a private subnet with no public endpoint, connect through an SSH bastion instead, which only needs that same IP allowed on port 22.
TLS that is actually verified
With SSL on, SaturnSQL checks the certificate’s authority, expiry and hostname. Amazon RDS for MariaDB verifies with no setup, because the RDS authorities are built in. MariaDB 11.4 and later generate a self-signed certificate when none is configured; MariaDB’s own clients can check that one using the account password, but SaturnSQL verifies against a certificate authority, so give the server a certificate from a CA you control and paste that CA into the connection. Details in SSL certificates.
A read-only user, pinned to that IP
A scheduled export only needs SELECT. MariaDB lets you pin the account to SaturnSQL’s address and require TLS in the same statement (use your bastion’s address instead if you tunnel). More in read-only database user.
CREATE USER 'saturnsql'@'100.49.19.161'
IDENTIFIED BY 'a-long-random-password'
REQUIRE SSL;
GRANT SELECT ON shop.* TO 'saturnsql'@'100.49.19.161';Moved off Azure Database for MariaDB? Microsoft retired it on 19 September 2025 and pointed customers to Azure Database for MySQL Flexible Server, which connects the same way. Same query, same schedule, same sheet.
What each scheduled run does
Queries MariaDB fresh
Every run hits the database, never a cached result, within a 300 second time budget.
Replaces only its own range
The previous result is cleared and the new one written from the start cell you pick (A1 by default). Formulas and notes elsewhere on the tab are left alone, so you can build pivots and charts beside the data.
Writes a clean header row
Column names go in the first row, bold, and frozen when the data starts in row 1. Turn headers off if the tab already has its own.
Runs on your clock
Hourly, daily, weekly, monthly, or a cron expression down to every 5 minutes, in the timezone you choose.
Recovers from failures
A failed run retries after about 15 minutes, backing off to every 6 hours, for up to 7 days. Whoever created the schedule gets an email once a retry confirms the failure.
Says when it is incomplete
Up to 100,000 rows per run. A run that hits the cap is marked capped in the run history.
Step-by-step setup: exporting to Google Sheets.
Other ways to get MariaDB into Google Sheets
You do not need SaturnSQL for a one-off. Here is when the free routes are enough, and where they stop.
Export a file and import it
The mariadb client prints tab-separated output with -e, and Google Sheets imports .tsv and .csv through File → Import, where you can replace the current sheet or append rows to it. SELECT ... INTO OUTFILE also works, but it writes the file on the database server and needs the FILE privilege.
mariadb -h db.example.com -u report -p shop \
-e "SELECT * FROM daily_orders" > daily_orders.tsvFine once. As a weekly routine it is the chore this page exists to remove.
Apps Script with the JDBC service
Apps Script can open a Jdbc.getConnection() to an external database and a time-driven trigger can run it on a schedule. Three catches for MariaDB. Google documents MySQL, SQL Server, Oracle and PostgreSQL, not MariaDB, so a jdbc:mysql:// URL against MariaDB is unsupported territory. Your database must allow Google’s published IP ranges (well over a hundred IPv4 blocks), not one address of your own. And each execution stops at 6 minutes, with a daily trigger budget of 90 minutes on consumer accounts and 6 hours on Workspace. You also own the credentials, the retries and the code.
| SaturnSQL | Apps Script + JDBC | CSV / TSV import | |
|---|---|---|---|
| Refreshes without you | Yes, on a schedule | Yes, with a time-driven trigger | No, every refresh is manual |
| MariaDB documented | MySQL / MariaDB connection type | No, Google lists MySQL | Yes, the mariadb client |
| What you allow in | One IP, 100.49.19.161/32 | Google’s published IP ranges | Nothing new |
| Time limit per run | 300 seconds | 6 minutes | None |
| When a run fails | Retries for 7 days, emails the owner | Whatever you script | You notice, eventually |
| Code to maintain | None, just SQL | Script, credentials, triggers | None, but it is a weekly chore |
Apps Script limits from Google’s JDBC and quota documentation as of October 2026. Sheets add-ons that pull from MySQL-compatible databases are another option; compare them on refresh frequency, per-user pricing, and which addresses you have to allow in. For a broader comparison see database to Google Sheets.
Frequently asked questions
Can Google Sheets connect to MariaDB directly?
Not with a built-in connector. The closest native option is the JDBC service in Google Apps Script, which Google documents for MySQL, Microsoft SQL Server, Oracle, PostgreSQL and Cloud SQL for MySQL, but not MariaDB, and which needs Google's published IP ranges allowed into your database. The other route is a tool that runs your query on a schedule and writes the result into the sheet, which is what SaturnSQL does.
How do I refresh MariaDB data in Google Sheets automatically?
Save the query in SaturnSQL and give it a schedule: hourly, daily, weekly, monthly, or a cron expression down to every 5 minutes, in the timezone you choose. Each run queries MariaDB again and replaces the previous result in the sheet, so nobody has to export or paste anything.
Does SaturnSQL connect to MariaDB as MySQL?
Yes. MariaDB speaks the MySQL client protocol, so you choose the MySQL / MariaDB connection type (port 3306 by default) or paste a mysql:// connection URL. Your SQL is executed by your MariaDB server, so MariaDB syntax and functions are available in scheduled queries.
Which IP address do I allow in my MariaDB firewall?
Allow 100.49.19.161/32 on port 3306. Every SaturnSQL connection comes from that one address. It is shared by all SaturnSQL accounts, so keep a read-only database user with a strong password as well. If the server has no public endpoint, connect through an SSH bastion instead.
Does it work with the default TLS in MariaDB 11.4?
MariaDB 11.4 turns SSL on by default and, if you have not configured a certificate, generates a self-signed one. MariaDB's own clients can verify that certificate using the account password. SaturnSQL verifies against a certificate authority instead, so for a verified connection give the server a certificate signed by a CA you control and paste that CA certificate into the connection. Allowing expired or mismatched certificates also connects, encrypted but without verification.
How many rows can a scheduled export send to Google Sheets?
Up to 100,000 rows per scheduled run. If a run is cut short, its entry in the run history is marked capped, so an incomplete sheet never looks complete. Google also caps a spreadsheet at 10 million cells.
How much does MariaDB to Google Sheets cost?
Google Sheets export and scheduling are in the Starter plan at €19/user/month. There is a 14-day free trial and no credit card is needed to start it.
Running MySQL too? See MySQL to Google Sheets. Want to query MariaDB by hand as well? See the MariaDB GUI.
Your MariaDB data in Sheets, on a schedule
From €19/user/month. Set it up in five minutes and stop pasting exports.
Start free for 14 daysNo credit card required.
Use Cases
Help
Learn SQL
© 2026 Panda Capital Oy Ab. All rights reserved.
