How to

How to connect Google Sheets to MySQL

How to connect Google Sheets to MySQL

Linking software from various companies can be too complicated for many people. However, as a Google Sheets user, you might want to export data to MySQL because this is a powerful data analysis tool.

This article will explore some of the best methods for connecting Google Sheets and MySQL and moving data between them.

Build Free Connections Using Google Apps Scripts

Google Apps Script is a program for application scripts. This allows automation for Google applications and provides limited development options. Using Google Apps Script will require you to use experts with the right knowledge about MySQL and Google App Script. It also implies that this process might take some time. Also, to link the two programs all need to use JDBC (Java Database Connectivity).

Before you start working with JBDC, you need to:

  1. Whitelist multiple IP ranges. You can find it here.
  2. Prepare connectivity information, including server, name, user name, password, and port number. It can look like this:
    Server: sql.yoursite.netName: sqlabc123 Username: sqlxyzPassword: Testing123Port Number: 2205
  3. Copy database information.

Now that everything is ready, do the following:

  1. Open the Google Sheet and Script Editor located in Tools> Script Editor.
  2. Name the Script Editor that you created with an easy way to recognize it.
  3. Apply database information. After the script template ( is loaded, you can delete it. Instead, you need to copy your database.
  4. Using information from step two, we need to enter the following:var server = “” var dbName = “sqlabc123” var username: “sqlxyz”Password: “Testing123″var port = 2205
  5. Now we can connect Google Sheets to the MySQL database by creating functions and writing code.
  6. Write the number of records that you want to transfer to MySQL.
  7. Close the connection with the “conn.close () function;

Run the script. Note that before you do that, Google will ask for authorization, but only this time.


Automatic Solution

If you prefer to skip writing code, there are several automatic solutions. They don’t need a lot of technical knowledge, but you have to buy it. However, many companies offer trials for their products. Here are a few that we recommend.


Klodio is distributed as an add-on for Google Sheets, and this is a recommended option for large companies. Some of their clients include Japanese online retail giants Rakuten and Netflix. This solution is fast to set up, and you can even use it to synchronize data across multiple sources. There is no coding, because all use drag and drop to create reports. Unlike many other automated solutions, Klodio supports two-way synchronization.


If your main goal is to export MySQL data to Google Sheets, QueryClips might be for you. This does not require coding, and query results can be easily shared. This is also a valuable tool for creating visuals for use in presentations. Although QueryClips offers additional functionality, including data export to JSON and CSV, it is not a solution for sending Google Sheets data to MySQL.


If all you need to do is export MySQL data to Google Sheets, Blockspring will make it easy. This is an add-on for Google Sheets that makes it fast to transfer databases. However, if you want to edit the data and then import it back in MySQL, you must use another solution.

Make decision

Both of these solutions have advantages. Methods that involve Google Scripts are recommended if you are a programmer or have them on your team. This consists of a lot of work when writing scripts, but you don’t need to invest in a commercial solution. However, keep in mind that this script needs to be modified and tested periodically to accommodate your business. If you need to hire someone to do it, you should ask about all future expenses. If you already have experts in your company, this might be what you need, especially for small and medium-sized organizations.

On the other hand, while some automated solutions require time to set up, most of them work out of the box. The main disadvantage is that this application is not free. Most of them offer trials, while the price is negotiable in some cases, especially if you are a large company. For smaller organizations, you can get solutions that are less powerful but also more affordable. That is why it is important to pay only for the options that you need to use.


Link Spreadsheet Data the Way You Want

Hopefully this article helps you identify one or more solutions to connect Google Sheets and MySQL. All are recommended, but choose the one that offers the most for your organization. Also, keep in mind that some of them cannot transfer data in either direction.

Which of these options interests you the most? Do you need software that transfers one or two ways between Google Sheets and MySQL? Let us know in the comments section below.

Related posts

How to Add Friends on the Nintendo Switch


How to Save Web Pages as PDFs on Microsoft Edge


How to change words, language, speed & build Alexa words


How to Back Up and Restore PS4 Data Save


How to Change a WiFi Network on Your Phone Bell


How to Disable Hungry Resources Chrome Extensions


How to play Xbox games on Xbox 360


How to add family members to Nintendo Switch Online


How to check if your PC is infected with Emotet malware