Pecan uses an industry-standard MySQL JDBC Driver to connect to your MySQL database so you can import data from it, and optionally, send predictions back to it. These processes happen automatically and only require Pecan to have access to your database.
The relevant steps are described below. If you need help with them, be sure to consult with your internal IT or DevOps team.
Prerequisite steps
First, make sure you whitelist these Pecan IP addresses:
54.246.108.184
54.216.8.168
54.73.234.235
2. Next, create a user for Pecan on your MySQL server by using the CREATE USER SQL command. This will provide Pecan with read access to the tables that will be used to build your model(s).
If you’re not sure which tables will be needed, you can simply provide read access to all tables. You’ll be able to decide which tables to import later when you import your data to Pecan.
How to configure a MySQL connection in Pecan
Log in to Pecan, select the “Connections” tab, and click Add connection.
Select “MySQL” and complete the following fields:
Connection name – This is how you’ll identify the connection when creating and working with models on the platform.
Names should be unique, reflecting the data source and what’s stored in it.
Valid characters include letters, numbers, and underscores (e.g. “paid_downloads_fall_2021”).
Note that connection names can’t be changed once created.
Connection type – Select "Read" if the connection will be used to import data into Pecan. Select "Write" if it will be used to export predictions from Pecan to MySQL.
Hostname – This is the address of your database (e.g.
my_db.eu-west-1.mysql.amazonaws.com
,96.127.44.11
).Port – This is the IP address of your server and connection port. The default port for MySQL instances is 3306.
Database – This is the name of the database Pecan should use.
Servers can hold many databases. If you want to access data from multiple databases that sit on the same server, you’ll need to create a new Pecan connection for each database.
Username and Password – You will have created these on your MySQL server during Step 2 of the prerequisite steps (above).
Now, click Test connection to make sure everything is working correctly. Then click Create connection to complete the setup. (For more information, see Testing and creating a data connection.)