MySQL

Manage and analyze all your data quickly and reliably with a connection to your MySQL database.

Connecting to MySQL

Before you get started you will need to obtain your MySQL host, port, database name and login information. Additionally, you will need to Whitelist these IP addresses before connecting your account.

Here are the steps to connect your MySQL database to Grow:

  1. Click on the Data tab at the top left of the global navigation. Then click on Connections in the Data Library section.
  2. Click on the blue Connect button and search for MySQL.
  3. Click on the MySQL logo.
  4. A pop up window will appear. If it does not, check your pop up blocker and allow pop ups from Grow.
  5. Type in a Connection Nickname, this can be anything and will be what shows up in the auth menu when you build future metrics from this connection.
  6. Type in the Host, Port, Database Name, Username and Password. If you are wanting to connect via SSH please read the FAQ section for further instruction.
  7. Click Submit.

And that's it! You are good to go.

Endpoints

MySQL does not have set reports through which to pull data. The endpoints are the tables inside your database, to see a list of your tables you can select the blue View Table Structure button below the query box.

FAQs + Tips and Tricks

Why is my connection returning a ETIMEOUT error?

This usually means that the IP addresses are not yet whitelisted, or the host, port, database name, or login credentials are incorrect. Double check and try again.

Why is my query taking a while to load?

If you know that your query is going to return a large amount of data we recommend trying to limit the time range and filter the data as much as possible by using a summary query.

How can I make sure my data is secure?

We have several items in place to keep your data safe. Check out our security article to see what steps you can take to keep control of your data.

How can I connect my database with an SSH Tunnel?

Once you have plugged in the connection information, before selecting Submit check the SSH Tunnel box. You will need to provide the SSH Host, SSH Port, SSH Username and Password. You can also use a keyfile instead of a password if you would like. Select Use SSH Key File and then upload your keyfile. If you are not able to or don't want to directly connect to your database directly, you can first connect to a server that has SSH access to your server, and Grow will then connect to your database through that server. If your database is on your SSH server, your database Host would be 'localhost', and your SSHHost would be the server hostname.

Read this article about connecting via SSH host for more information.

Why am I getting ER_NO_SUCH_TABLE error?

If you're trying to sync a MySQL table and you're getting an "ER_NO_SUCH_TABLE" error, it means that the table you're trying to sync does not exist in the database you're connected to, or the table may have been deleted or the user may no longer have access to it.

The "ER_NO_SUCH_TABLE" error can be caused by a variety of issues, including misspelled table names, incorrect database connections, user permission issues, and deleted tables. You should be able to resolve the error and successfully sync your MySQL table by following the steps mentioned below.

To troubleshoot this issue,

  • You can start by double-checking the spelling of the table name to make sure it's correct. It's possible that a small typo is causing the error.
  • You can also verify that you're connected to the correct database. It's possible that you're connected to a different database than the one where the table exists.
  • Another thing to check is the permissions for the user you're using to connect to the database. Make sure that the user has permission to access the table you're trying to sync. If the user's permissions have been revoked or modified, that could be causing the error.
  • If you've tried all of these solutions and you're still seeing the error, it's possible that the table has been deleted from the database. In this case, you'll need to restore the table from a backup or recreate it manually.

Common MySQL Queries

Start of Month:

(LAST_DAY(NOW() - INTERVAL 1 MONTH) + INTERVAL 1 DAY)

Start of week:

DATE_ADD(now(), INTERVAL (DAYOFWEEK(now()) - 7) DAY)

Start of last week:

DATE_ADD(now(), INTERVAL (DAYOFWEEK(now()) - 14) DAY)

Total calls from InsideSales

SELECT substr(date,1,10) as day, count(*) as total_calls
FROM call_details>
WHERE date >= FIRST_DAY(Now())
GROUP BY day

MySQL - Create a Row Number
Here's the template for a query to add a new column with row number to a table in a query.

SELECT t.*,
@rownum := @rownum + 1 AS rowNumber
FROM Your_Table
(SELECT @rownum := 0)
Was this article helpful?