Skip to main content

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:

  1. Open the Squid Console and select your application to use with MySQL.
  2. Click the Integrations tab, and then click Available integrations to view all integrations.
  3. Select the MySQL integration.
  4. 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.

MySQL integration

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 TypeSquid Type
bigintnumber
binarystring
bitstring
blobstring
booleanboolean
charstring
datedate
datetimedate
decimalnumber
doublenumber
enumstring
floatnumber
intinteger
jsonmap or array
longblobstring
longtextstring
mediumblobstring
mediumintinteger
mediumtextstring
setstring
smallintinteger
textstring
timestring
timestampdate
tinyblobstring
tinyintinteger
tinytextstring
varbinarystring
varcharstring
yearnumber

To learn how to work with MySQL data in Squid, view the Client SDK documentation.