We use cookies to personalize your experience.Learn More

Blog / Database

Integrating external databases with Canonic

In Canonic, you can connect an external database via either of the two options while creating a project: import or link. Let's learn more about it in this guide.

Pratham Agrawal

Thu Apr 21 20221 min read

In Canonic, you can connect an external database via either of the two options while creating a project:

  1. Import
  2. Link

Import: This option will connect to the external database and import all the data from external database to a Canonic provisioned MongoDB database. As a result, it’ll autogenerate your tables on Canonic as defined in the external database. Your project will have all the data imported from external database, and it’ll use Canonic provisioned MongoDB as the primary database.

Link: This option will connect to the external database and use it as the primary database. All of the data will stay in the external database itself.

Which databases are supported?

Canonic supports 4 external databases as of now - MongoDB, MySQL, MS SQL, PostgreSQL. For creating the connection with the database, you’ll require a database string. It looks like this for different databases:

  • MongoDB - mongodb://username:password@host:port/dbname
  • MySQL - mysql://username:password@host:port/dbName
  • MS SQL - sqlserver://HOST:PORT;database=DATABASE;user=USER;password=PASSWORD
  • PostgreSQL - postgresql://username:password@host:port/dbName

You can use the Test Connection button to first test your connection and proceed ahead with the Link button to finish up linking your external database with Canonic.

Did you find what you were looking for?
👍
👎
What went wrong?
Want to discuss?We have a thriving Discordcommunity that can help you. →

Enough said, let's start building

Start using canonic's fullstack solution to build internal tools for free