Loading...

MySQL

Run read-only SQL queries against your MySQL database and bring the results into the sheet.

The MySQL connector runs a SQL query of your choice, read-only, against a MySQL database you manage: no OAuth required, it uses the host, port, database name, username and password you enter when connecting.

Only SELECT queries are allowed (optionally preceded by WITH): no INSERT, UPDATE, DELETE or statements that change the schema, checked before every run.

Tip for daily updates: to automatically pull only new data every day (e.g. with a schedule and "Append new results to old" enabled), no special mechanism is needed: write a condition directly in the query using MySQL's own date functions, evaluated by the database on every run, e.g. WHERE DATE(data_inserimento) = CURDATE() or WHERE data_inserimento >= CURDATE() - INTERVAL 1 DAY. The saved query text never changes, but the result changes every day because these functions are evaluated by the database at execution time, not when you write the query once.

Available metrics

There are no fixed metrics or dimensions: the report columns are exactly the columns your SQL query returns (the column names or aliases used in the SELECT).

Known limits

  • SELECT-only queries (or WITH)
    One statement per query, no INSERT/UPDATE/DELETE or schema changes: checked before every run. A query that fails this check shows an error instead of running.
  • No test when you connect
    The connection page saves what you enter without testing it: the real test happens the first time you select that connection to configure a report, not when you create it.
  • The server must be reachable from the internet
    Does not work with local networks or behind a VPN. The server firewall must allow the IP ranges Google publishes at gstatic.com/ipranges/goog.json, and the port must be 1025 or higher (standard 3306 is fine).
  • Unencrypted connection (SSL disabled)
    For compatibility with older MySQL servers, the connection does not use SSL/TLS. Always use a dedicated MySQL user with read-only (SELECT) permissions, not one with broader privileges.

Filters and sorting

  • The sidebar's filters, sorting and limit don't apply
    Unlike other connectors, there are no filter/sort/limit fields in the standard configuration here: the SQL query decides everything. Write WHERE, ORDER BY and LIMIT directly in the query.