How to connect a MySQL database to Google Sheets

Connecting your MySQL database with Castodia

[Update: December 2020] Users will no longer need to individually share each sheet with the Castodia service account as described in the video. Users will instead be required to authenticate with their Google Account only once and this will automatically enable auto-refresh for any sheet.

In order to run queries, you must set up your MySQL database first.

To connect a MySQL database to Google sheets, follow the steps below:

  1. Create a new Google Sheet.
  2. In the toolbar section, click on "Add-Ons" to access the Castodia Database Connector.
  3. You will see two options as you hover over the add-on: launch and settings. Click "Settings."
  4. Type in a name to help identify your database
  5. Click the drop-down menu to access the mySQL database
  6. Gather and enter your database connection information. There are five components needed:
  • Database Name
  • Host
  • Port
  • Username
  • Password
  1. Click the "Test" button to run the database and verify your credentials.
  2. A green notification indicates the add-on was successfully installed. A pink notification indicates that there may be an issue with the installation. If that is the case, please reach out to our support team.
  3. Click "Save"

And that's it! Enjoy running your queries.

Connectors

Start free trial

Try Castodia free for 14 days, no credit card required.