Manage and analyze all your data quickly and reliably with a connection to your MySQL database.
NOTE: This data source is only available for accounts on the Professional plan. If you would like to upgrade your plan, talk to your Grow account manager or visit your account's billing page.
How to Connect
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:
- Log into your Grow account, then press Add Metric.
- Navigate to the MySQL and select it. Click Connect.
- A pop up window will appear. If it doesn’t check your pop up blocker and allow pop ups from Grow.
- 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.
- 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.)
- Click Submit.
And that's it! You are good to go.
MySQL doesn’t 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 awhile 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 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.
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
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.
@rownum := @rownum + 1 AS rowNumber
(SELECT @rownum := 0)