Google Sheets and MySQL integration
Whalesync syncs Google Sheets and MySQL both ways. Pair a tab with a table, and rows your team edits in the spreadsheet are written to the database, while rows your app adds appear in the sheet.
What you can do with Google Sheets and MySQL
Manage promo codes without writing SQL
Your app reads promo codes from a MySQL table, and marketing would rather keep them in a sheet. Sync the two: a code added in the sheet is inserted as a row on Whalesync's next pass, and a changed end date updates it. MySQL checks every value as it's written, so a discount type the column doesn't list is refused and reported, never stored.
Give finance current numbers without a database login
Write a view that returns what finance needs, such as paid orders with each customer's name, and sync it to a tab. Views sync one way, out of MySQL, so finance reads and filters current numbers in a spreadsheet, and nothing typed there is written back. The view only needs a unique whalesync_mysql_id column, which can be the order's own ID.
Count stock from a phone
Staff walk the aisles with the Google Sheets app and type counts into a tab synced to the inventory table your store reads. Each count is written to MySQL on Whalesync's next pass over the sheet, and items added in the database appear as new rows. Grant the Whalesync user UPDATE on the count column alone, and the other columns sync into the sheet one way, so a slip of the thumb can't rename a product.
Move a sheet that outgrew Google Sheets into MySQL
When a tab gets too big or too important for a spreadsheet, which Google caps at 20 million cells, choose Create new table for it. Whalesync builds a MySQL table from the tab, with a column for each of its columns and an auto-increment ID. The team keeps working in the sheet while engineers point the app at the table, and the two stay in step until the sheet is retired.
Everything that syncs
Each card is something you can sync between Google Sheets and MySQL.
-
All Tables Two-way
-
All Tables Two-way
How to sync Google Sheets and MySQL
Step 1: Get MySQL ready
Whalesync reaches MySQL over the internet, so the server must accept connections from outside your network. Allow Whalesync's address, 34.66.3.22, through your firewall, and create a MySQL user that can sign in from it with a password. Grant it SELECT, INSERT, UPDATE, and DELETE on the database, plus ALTER and CREATE if Whalesync should add ID columns or build tables for you. A server you can reach only through an SSH tunnel can't be connected.
Step 2: Start a sync and connect MySQL
In Whalesync, click New sync and choose Google Sheets and MySQL. In the MySQL dialog, enter the host, port, username, and password under Connection details, or paste a mysql:// string under Connection string. Leave Database empty to list every database the user can open. SSL Mode can stay on Automatic unless your provider gives you a CA certificate to check against.
Step 3: Connect Google Sheets
Paste the spreadsheet's link and sign in with a Google account that can edit it. Each tab you sync needs a single header row with no merged cells. Whalesync inserts a Whalesync ID column at column A of each synced tab and freezes the header row, so leave both alone once the sync is running.
Step 4: Pair tabs with tables
Match each tab to a MySQL table, or pick Create new table to have Whalesync build one from the tab. A table with no usable ID is listed as needing setup: click Add Whalesync ID column and it's ready. Views and MyISAM tables are offered too, and they sync one way, from MySQL into the sheet.
Step 5: Map columns
Automap asks an AI model to pair the sheet's columns with the table's from their names and types, without reading any rows. Check what it paired and map the rest by hand. For columns that sync both ways, format the sheet column like its MySQL column, numbers as numbers and DATE columns as dates, and keep values in an ENUM column to its options.
Step 6: Match existing rows and activate
If the tab and the table both hold rows, pick a column to match them on, such as SKU or email. Matching is exact, case included, even where MySQL's collation ignores case. Check the preview of rows to be added on each side, then activate the sync.
3 ways to connect Google Sheets and MySQL
-
Apps Script's JDBC service
Best when a developer will write and maintain the script, and a push or pull on a schedule is enough.
-
Zapier
Best when you want new or updated rows copied one way, as a step in a longer workflow.
- MySQL is a premium app, so it needs a paid plan
- The database has to accept Zapier's IP ranges
- Each Zap goes one direction: no two-way sync
-
Whalesync
Best when people edit the sheet while the app writes to the table, and each needs the other's changes.
- Two-way between tabs and InnoDB tables, with no script to keep running
- Creates the MySQL table from a tab, ID column included
- Priced by records in sync, not by the rows that change
Apps Script's JDBC service and Zapier checked against their own pages in November 2026.
Frequently asked questions
Can Google Sheets connect to a MySQL database?
Yes, in a few ways. Google's Apps Script can read and write MySQL through its JDBC service, though you write and schedule the script yourself, and Connected Sheets works with BigQuery and Looker, not MySQL. Whalesync connects a spreadsheet to a MySQL database with no code and keeps each tab and table in sync both ways.
How do I sync Google Sheets with MySQL automatically?
Let Whalesync's address, 34.66.3.22, reach your server, then connect MySQL with a host and password or a connection string, and Google Sheets with the spreadsheet's link. Pair each tab with a table, map the columns, and turn the sync on. The guide below covers each step.
Is the Google Sheets MySQL sync real-time?
Not quite. Google Sheets can't tell Whalesync that something changed, so Whalesync rereads the sheet every few minutes. On the MySQL side, a table with an indexed column that MySQL stamps on every change (ON UPDATE CURRENT_TIMESTAMP) is checked for changed rows every 15 seconds; any other table is reread in full, 1,000 rows at a time, so a big one takes longer.
Which MySQL tables can sync both ways?
InnoDB tables with a record ID: an auto-increment or UUID primary key, or a whalesync_mysql_id column, which Whalesync adds when you click Add Whalesync ID column. Views and MyISAM tables sync one way, from MySQL into the sheet, and a view needs a unique whalesync_mysql_id in its query.
What happens if a sheet value doesn't fit the MySQL column?
MySQL refuses it. Whalesync writes in strict mode, so text longer than a VARCHAR allows, a number outside an integer's range, or a word that isn't one of an ENUM's options is rejected rather than cut to fit. The row shows as a sync issue until it's fixed in the sheet.
Does Whalesync work with MariaDB and hosted MySQL?
Yes, for servers that accept a password sign-in from the internet. It's tested on MySQL 8.0 and 8.4 and MariaDB 11.4, and has been checked on MySQL 5.7 and 9.7 and MariaDB 10.3 to 11.8. Hosts that expose MySQL only through an SSH tunnel, such as WP Engine and Kinsta, can't be connected. See the MySQL docs.