MySQL
Squid can connect to a MySQL database to serve as the data source for your Squid application.
MySQL is an Open Source SQL database management system. With Squid, you can integrate with your MySQL database and even join data with other database integrations.
To integrate your MySQL database with Squid, complete the following steps:
- Open the Squid Console and select your application to use with MySQL.
- Click the Integrations tab, and then click Available integrations to view all integrations.
- Select the MySQL integration.
- Provide the following configuration information:
- Integration ID - Choose an ID that is brief and helps identify the integration.
- Database endpoint - The database host including the port number.
- MySQL username
- MySQL password - To keep it private, store your password in Squid Secrets.
- Database name - The name of the database to connect to.
Once you've entered the connection information, you can click on "Test Connection" to confirm that the connection is functioning properly.
Securing your database
By default, security rules are required, and in a production environment, it's essential to never allow access to the integration without them. Learn more about securing your database data in the security rules documentation.
Datatype mapping
The following table outlines the datatype mapping between MySQL and Squid:
MySQL Type | Squid Type |
---|---|
bigint | number |
binary | string |
bit | string |
blob | string |
boolean | boolean |
char | string |
date | date |
datetime | date |
decimal | number |
double | number |
enum | string |
float | number |
int | integer |
json | map or array |
longblob | string |
longtext | string |
mediumblob | string |
mediumint | integer |
mediumtext | string |
set | string |
smallint | integer |
text | string |
time | string |
timestamp | date |
tinyblob | string |
tinyint | integer |
tinytext | string |
varbinary | string |
varchar | string |
year | number |
To learn how to work with MySQL data in Squid, view the Client SDK documentation.