Configure SQL Connector

Just a few more important steps!

The power of Bubble is found in the ability to use Data Types within the Bubble design editor and within the workflow editors to craft logic statements and display/filter results. This is provided by default when using the built-in Bubble Database. Unfortunately, when using a plugin we don't have the same ability to create custom Data Types.

Fortunately, there is an easy work around using the built-in Bubble SQL Database Connector that will allow us to leverage the power of custom Data Types. The following steps are an important part of the setup process. Please read them over carefully.

The first step is to connect the Bubble SQL Database Connector to your SQL database. This requires inputing your database settings in a very specific format as shown below:

mssql://database_user:user_password@server_nameORip:port/database_name?encrypt=true

A few critical pieces of information to save you from struggling with failed connections:

  • Bubble does not reserve specific IP address for their clustered environment. Consequently, you must create a database/firewall rule to allow connections from all IP addresses (unless you are on a dedicated plan). Security, not so much. Requirement, unfortunately yes.

    • If you are connecting to an Azure database you can find the setting under your sql server->Networking (click "Show networking setting".

    • Then specify the rule as follows:

  • Your database user_password cannot contain a "#". Including a # in the user password will cause the connection to fail with little information as to why it failed.

  • You must include ?encrypt=true at the end of the connection string.

Once you have completed these steps click the "Test the Connection" button. If everything worked correctly, the button will be disabled and it will say "Database Connected".

Last updated