mysql to spreadsheets MySQL + Google Sheets Google Spreadsheets

 =

KPIBees Google Add-on.

How to connect MySQL to Google Sheets

Let’s assume that you want to export mysql data from your database into spreadsheets because you think your marketing colleagues would better cope with the familiar excel format or you might want to create reports that contain both information from other tools and internal database data.

You’ve come to the right place, one easy way to connect MySQL to Google Sheets is KPIBeesThere’s no need to write code or Google Apps Script! The Add-on can be installed and you can connect spreadsheets to your mysql database in just a few clicks – no other setup needed! 

With the KPIBees Add-on, you can integrate MySQL with Google Sheets and bring your data into excel format in no-time! It works in a very simple way, you define your mysql queries and save them to your desired spreadsheet cells. Afterward, you can set refresh triggers that will automatically bring updated database data to your spreadsheet so you have an updated version every time you come back!

Export MySQL query to Google Sheets

To get started, please follow the next steps:

STEP 1

STEP 2

Grant access to KPIBees to your Google account. Don’t worry, we’re 100% GDPR compliant!

STEP 3

Access the add-on in any of your spreadsheets by going to the Add-ons toolbar.

Google Sheet Add-on location toolbar.

STEP 4

Click on the MySQL integration.

Select mysql integration to google sheets

STEP 5

Click on the + button from the Database Connection to add a new MySQL database connection.  You can have multiple databases connected to your spreadsheet to pull data.

Add mysql database to Google Sheets

STEP 6

Add your database connection credentials. Please use a read-only user for safety precautions. When you are done, check whether the connection is successful with the “Test connection” button. It’s important to note that your database host must be accessible on the internet. Therefore, a localhost database won’t work – you need to expose it on the internet. 

Add mysql credentials to database

STEP 7

After you’ve added the database connection, name your query and write the SQL query that you want brought to the sheet, then click create query. The data will be pulled in your selected spreadsheet cell.

Import mysql query to google sheets

STEP 8

You can add as many mysql queries as you want from multiple databases and even other data sources! These queries can be edited or refreshed from the Manage Queries menu.

Add multiple mysql queries in a spreadsheet

STEP 9

When you’re done with adding your mysql queries to the spreadsheet make sure you set automated refresh triggers with email or Slack notifications!

Schedule automatic refresh of SQL Server queries in Google Sheets

Export Google Sheet to MySQL

Let’s say that you’ve modified some exported MySQL data in the Google Sheet and you need to propagate the changes back to your database. KPIBees does not offer this feature directly, but there’s a trick that you can use to construct the SQL queries of your modifications.
In order to propagate edit changes back to your MySQL database, you can use the following spreadsheet template.
Import Google Sheet to MySQL
Furthermore, KPIBees supports integrations that enable you to create incredible marketing reports that include your MySQL database:

Here are all the Google Sheets integrations that KPIBees supports: