Pricing

Does Google Sheets Have a MySQL Connector? (What Excel Has That Sheets Doesn't, and How to Fix It)

JDBC URLjdbc:mysql://HOST:3306/DATABASE ?useSSL=true&characterEncoding=UTF-8Apps Script · JDBCconst conn = Jdbc.getConnection(url, user, pass);const rs = conn.createStatement() .executeQuery("SELECT * FROM orders");sheet.appendRow(row); // → Google Sheets5,280rows importedsynced
JW
James Whitfield

Google Sheets has no native MySQL connector. Learn what Excel offers through Power Query, why Sheets is missing a built-in database connection, and which add-ons fill the gap.

If you have ever searched for a native MySQL connector in Google Sheets and come up empty, you are not alone. The question has generated over 118,000 views on Stack Overflow. The short answer: Google Sheets does not have a built-in MySQL connector. Excel does. This article explains what each product actually offers, why the gap exists, and what you can do about it today.

What Excel Offers: Power Query and Native Database Connections

Microsoft Excel includes Power Query: a built-in data transformation engine that ships with every version of Excel 2016 and later, plus Microsoft 365. To connect Excel to a MySQL database, you go to Data > Get Data > From Database > From MySQL Database, enter a server address and credentials, and Excel opens a visual query builder. No code required.

Power Query handles:

  • Connection management. Credentials are stored in the Windows Credential Manager and reused across sessions. You do not re-enter a password every time the spreadsheet opens.
  • Schema browsing. Power Query shows a tree view of your database, schemas, and tables. You click a table to preview its data before importing.
  • Visual transformation. Filter rows, rename columns, change data types, merge tables, and unpivot data using a point-and-click interface. Every step is recorded as a query formula (M language) that you can inspect and edit.
  • Scheduled refresh. In Microsoft 365 and SharePoint, workbooks connected via Power Query can refresh automatically on a schedule.
  • Write-back via Power Apps/Power Automate. Though Power Query itself is read-only, Microsoft's ecosystem provides pathways for write-back through connected services.

The MySQL connector in Power Query requires the MySQL Connector/NET driver installed on the Windows machine. It is not browser-based, which matters: Excel desktop is a native application. This distinction becomes important when comparing it to Google Sheets.

What Google Sheets Actually Has: JDBC via Apps Script

Google Sheets is a web application. It runs in a browser and has no access to drivers installed on your local machine. There is no Power Query equivalent, no Get Data menu, and no native database connector of any kind in the Sheets interface.

What Google does provide is the Apps Script JDBC service: a server-side JavaScript environment that can open JDBC connections to external databases, including MySQL. The key word is "server-side." Your code runs on Google's servers, not in your browser, which is why it can reach MySQL without needing a local driver.

Here is what a minimal MySQL connection via Apps Script looks like:

javascript
function importFromMySQL() {
  var conn = Jdbc.getConnection(
    'jdbc:mysql://your-host:3306/your_database',
    'your_username',
    'your_password'
  );

  var stmt = conn.createStatement();
  stmt.setMaxRows(1000);
  var results = stmt.executeQuery('SELECT * FROM customers LIMIT 1000');

  var sheet = SpreadsheetApp.getActiveSheet();
  sheet.clearContents();

  var metaData = results.getMetaData();
  var numCols = metaData.getColumnCount();

  // Write headers
  var headers = [];
  for (var col = 1; col <= numCols; col++) {
    headers.push(metaData.getColumnName(col));
  }
  sheet.appendRow(headers);

  // Write data rows
  while (results.next()) {
    var row = [];
    for (var col = 1; col <= numCols; col++) {
      row.push(results.getString(col));
    }
    sheet.appendRow(row);
  }

  results.close();
  stmt.close();
  conn.close();
}

This works. But it is not a connector. It is a script you wrote (or copied) that you now own and maintain. Compare this to Power Query's point-and-click import.

The JDBC approach has several practical limitations:

  • Your MySQL host must be publicly accessible or accept connections from Google's IP ranges.
  • Credentials are stored in the script itself (plaintext) or in Script Properties (slightly better, but still not a credential manager).
  • There is no visual query builder or schema browser.
  • The 6-minute execution timeout means large result sets time out before they finish loading.
  • Any change to the query, schedule, or column mapping requires editing code.
  • If the script breaks, you are the one who fixes it.

The JDBC service is not a connector in any meaningful product sense. It is a low-level API that lets developers build connectors.

Why Google Has Not Built a Native Connector

Several factors explain why Google Sheets lacks a native database connector after more than a decade:

Architecture mismatch. Excel is a native Windows application that can use the operating system's driver infrastructure. Google Sheets runs in a sandboxed browser tab. A native connector would require a browser extension or a helper application to bridge the gap: adding installation complexity that conflicts with Sheets' zero-install value proposition.

Google's ecosystem incentives. Google's database products are BigQuery, Cloud SQL, and Spanner. There is a native BigQuery connector in Sheets (Data > Data connectors > BigQuery). Building a MySQL connector that makes it easy to keep data outside Google's ecosystem does not serve Google's strategic interests.

Target user profile. Excel's enterprise user base includes finance teams and analysts who routinely connect to on-premise databases. Google Workspace's user base skews toward startups, education, and organizations that are already cloud-native. The demand signal for direct MySQL connectivity has historically been lower in Google's customer base.

Third-party market. Google's add-on marketplace creates a business opportunity for third parties to solve the MySQL connector problem. From Google's perspective, letting the ecosystem fill the gap is more efficient than maintaining a connector for every database type. This is a rational product decision: though frustrating if you are the person trying to connect a spreadsheet to a database.

Add-Ons and Third-Party Connectors That Fill the Gap

The Google Workspace Marketplace has several tools that provide what Sheets lacks natively.

brooked.io is a purpose-built MySQL-to-Sheets connector. You provide your database credentials and connection details through a secure web interface, configure which tables or queries to import, and the connector handles the rest. Data refreshes on a schedule you set. Unlike Apps Script, there is no code to maintain, no execution timeout to fight, and credentials are stored securely by the service rather than in a script. brooked.io also supports write-back (pushing edits from Sheets back to MySQL) which places it well beyond what any read-only query script can do.

Coefficient is a broader data connector add-on that supports MySQL along with Salesforce, HubSpot, PostgreSQL, and other sources. It installs as a Sheets add-on and provides a sidebar interface for configuring connections. The MySQL setup requires manual entry of connection details and a SQL query. Coefficient is a good choice if you need to pull from multiple data sources into the same spreadsheet.

SeekWell (now part of Mode) offers scheduled SQL queries that push results into Sheets. You write SQL in their interface, and results land in a specified spreadsheet tab on a schedule. It does not support write-back.

Apps Script (DIY) remains an option for teams with a developer available and specific requirements that pre-built connectors do not meet. The code complexity and maintenance burden are real costs.

Comparison Table

ApproachSetup ComplexityNo-CodeScheduled RefreshWrite-BackLarge Dataset SupportCost
Apps Script JDBCHigh (write code)NoYes (triggers)Yes (custom)Limited (6-min timeout)Free
brooked.ioLowYesYesYesYesPaid
CoefficientMediumMostlyYesYesYesFreemium
SeekWellMediumMostlyYesNoYesPaid
Excel + Power QueryLow (native)YesYes (desktop)LimitedYesIncluded with Excel

How to Choose the Right Approach

Choose Apps Script if you have a developer on your team, your data fits within the 6-minute execution limit (roughly under 5,000 rows depending on column count), and you want zero additional cost. Budget time for ongoing maintenance when the script breaks.

Choose brooked.io if you want a dedicated MySQL connector with no code, need reliable scheduled refreshes, have data volumes that exceed Apps Script limits, or need write-back. It is the closest equivalent to what Power Query provides in Excel, but for Sheets.

Choose Coefficient if you are pulling from multiple data sources (not just MySQL) and want a single add-on that handles all of them. The broader connector coverage comes with a more complex setup per source.

Choose SeekWell if you are comfortable writing SQL and want a clean interface for managing scheduled queries. The lack of write-back is a real limitation if your workflow requires it.

Troubleshooting

"Cannot connect to database" in Apps Script The most common cause is a firewall blocking the connection. MySQL defaults to port 3306. Your database host must accept connections from Google's server IP ranges, or you need to configure an SSH tunnel. Check that the host is not limited to localhost connections only.

Apps Script add-on does not appear in the Extensions menu The add-on was installed for a different Google account. Google Workspace add-ons are account-specific. Sign in with the account you used to install the add-on, or reinstall it for the current account.

Data loads but dates appear as numbers Apps Script JDBC returns date values as Java timestamp integers. Use new Date(results.getLong(col)) instead of results.getString(col) for date columns, then format with Utilities.formatDate().

Connector add-on times out on large queries Reduce the result set by adding a WHERE clause, using aggregate functions in SQL, or filtering to a date range. Connectors that run on external infrastructure (not Apps Script) handle larger datasets more reliably.

Bottom Line

Google Sheets does not have a native MySQL connector, and it is unlikely to get one given Google's architectural constraints and ecosystem incentives. Excel's Power Query provides a significantly better out-of-the-box experience for database connectivity. For Sheets users, the practical options are Apps Script (free, requires code, has timeout limits) or a third-party add-on like brooked.io (paid, no-code, handles large datasets and write-back). If your workflow requires reliable, scheduled MySQL imports into Sheets, a dedicated connector is the pragmatic choice.

Connect MySQL to Google Sheets Today

Set up a MySQL connection in Google Sheets with brooked.io, no code required. Enter your credentials, choose your query, set a refresh schedule, and your Sheets data stays in sync automatically.

Related articles:

Troubleshooting quick reference

Frequently asked questions

Is there a free MySQL connector for Google Sheets?

The only free option is Apps Script with the JDBC service. It requires writing and maintaining JavaScript code, and it has execution time limits. All third-party connector add-ons that provide a no-code interface are paid products, though several offer free tiers with limited rows or syncs.

Can I connect Google Sheets to a MySQL database without coding?

Yes, through third-party add-ons. brooked.io and Coefficient both provide no-code interfaces for connecting Sheets to MySQL. You enter your database credentials, select a table or write a query, and the tool handles the connection and data transfer.

Does Google Sheets support Power Query?

No. Power Query is a Microsoft product built into Excel and Power BI. It does not run in Google Sheets. Google Sheets has no equivalent built-in data transformation engine, though third-party tools provide similar functionality.

Why does my JDBC connection work sometimes and fail other times?

Intermittent connection failures in Apps Script are usually caused by connection pool limits on the MySQL server, network timeouts, or Google's servers temporarily being blocked by a firewall rule. Adding retry logic to the script helps. A more reliable solution is using a connector service that manages connection pooling and retries automatically.

Can I query multiple MySQL databases in the same Google Sheet?

With Apps Script, yes. You open separate JDBC connections and write results to separate sheets or ranges. With third-party connectors, support varies. brooked.io allows multiple configured connections, so you can pull from different databases into different tabs of the same spreadsheet.

What is the maximum number of rows I can import from MySQL into Google Sheets?

Google Sheets has a hard limit of 10 million cells per spreadsheet. For practical purposes, large imports slow down the spreadsheet significantly above 50,000–100,000 rows. Apps Script's 6-minute execution limit is the binding constraint for direct JDBC imports. Third-party connectors that run on their own infrastructure can handle larger datasets before the Sheets cell limit becomes the bottleneck.

Ready to connect your data to Google Sheets?

Brooked's free tier covers 100 imports per month with AI Analyst included, no credit card required.

Install Brooked free →

Also in Google Sheets

More Google Sheets guides

Get your spreadsheet hours back

Brooked sets up in seconds. Your team is querying live data before lunch.

Get started free