Stitch Documentation
has moved!

Please update your bookmarks to

If you're not automatically redirected after 5 seconds, click here.

Connecting MySQL via Direct Connection

One thing we take seriously is data security. We strongly recommend you use SSH or some other form of encryption to secure your data. If this is not an option, you can still directly connect Stitch to your database using the instructions in this article.

Replicating Views
Click here for more info on replicating your views.

Connecting MySQL RDS
Stitch supports connecting a MySQL-based Amazon RDS instance.

In this article, we'll walk you through directly connecting your MySQL database to Stitch. These settings can also be used with Magento and any other eCommerce databases that use MySQL.

Connecting MySQL is a five-step process:

  1. Whitelist the Stitch IP addresses
  2. Create a MySQL user for Stitch
  3. Enter the connection info into Stitch
  4. Define the Replication Frequency
  5. Select tables and columns to sync

Whitelisting the Stitch IP Addresses

For the connection to be successful, you must configure your firewall to allow access from our IP addresses. Whitelist the following IPs before continuing onto the next step:


Creating a MySQL User for Stitch

Note that anything inside square brackets - [like this], for example - is something you need to define when running the commands yourself.

The simplest way to create a MySQL user for Stitch is to execute the following query when logged into MySQL with GRANT privileges:

GRANT SELECT ON *.* TO '[stitch username]'@'<[Stitch IP address]>' IDENTIFIED BY '<[secure password]>';

To restrict this user from accessing data in specific databases, tables, or columns, you can instead run GRANT queries that only allow access to the data you permit.

Re-run the GRANT query for all required IPs using the same user and password. 

Entering the Connection Info in Stitch

To wrap things up, we need to enter the connection and user info into Stitch.

  1. On the Stitch dashboard page, click the Add an Integration button.
  2. Click the MySQL icon.
  3. Enter the following:
    • Integration name: This is the name that will display on the Stitch dashboard for the integration; it’ll also be used to create the schema in your data warehouse.

      For example, the name “MySQL Marketing” would create a schema called mysql_marketing in the data warehouse.
    • Host: the public address of the MySQL server we are connecting to
    • Username: The Stitch MySQL user's username
    • Password: The Stitch MySQL user's password
    • Port: The MySQL port used by your database instance (3306 by default)

Defining the Replication Frequency

The Replication Frequency controls how often Stitch will attempt to replicate data from your data warehouse. By default, the frequency is set to 30 minutes, but you can change it to better suit your needs.

When you're finished, click the Save Integration button to complete the setup.

Selecting Tables and Columns to Sync

Now that your MySQL database is connected to Stitch, the last step is selecting the tables and fields you want to sync from your database.


Was this article helpful?
0 out of 0 found this helpful


Questions or suggestions? If something in our documentation is unclear, let us know in the comments!