Database Connection
Connect a PowerSync Cloud instance to your backend database.
Create a PowerSync Cloud Instance
- In the Overview workspace of the PowerSync Dashboard you will be prompted to create your first instance:
If you previously created an instance, you can create a secondary instance by navigating to the Manage instances workspace and clicking on Create new instance.
- Give your instance a name, such as “Testing”.
- [Optional] You can change the default cloud region from US to EU, JP (Japan), AU (Australia) or BR (Brazil) if desired.
- Note: Additional cloud regions will be considered on request, especially for customers on our Enterprise plan. Please contact us if you need a different region.
- [Optional] You can opt in to using the Beta version of the Service, which may contain early access or experimental features. Always use the Stable version in production.
- Click Next.
Each provider has their quirks when it comes to specifying connection details, so we have documented provider-specific instructions below.
Postgres Provider Specifics
Select your Postgres hosting provider for steps to connect your Postgres database to the newly created PowerSync instance:
For other providers and self-hosted databases:
MongoDB (Beta) Specifics
- Fill in your connection details from MongoDB:
- Copy your cluster’s connection string and paste it into the PowerSync instance URI field. PowerSync will automatically parse this URI to populate other connection details.
- The format should be
mongodb+srv://[username:password@]host/[database]
. For example,mongodb+srv://admin:<db_password>@cluster0.abcde1.mongodb.net/powersync
.
- The format should be
- Enter your database user’s password into the Password field. See the necessary permissions in Source Database Setup.
- “Database name” is the database in your cluster to replicate.
- Copy your cluster’s connection string and paste it into the PowerSync instance URI field. PowerSync will automatically parse this URI to populate other connection details.
- Click “Test Connection” and fix any errors. If have any issues connecting, reach out to our support engineers on our Discord server.
- Make sure that your database allows access to PowerSync’s IPs — see Security and IP Filtering
- Click “Save”.
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Note: PowerSync automatically selects the “Beta” version of the Service when adding a MongoDB connection while MongoDB support is in a beta release, as updates may be made against this version more frequently.
Also see:
MySQL (Alpha) Specifics
- Fill in your connection details from MySQL:
- “Name” can be any name for the connection.
- “Host” and “Database name” is the database to replicate.
- “Username” and “Password” maps to your Database user.
- Click “Test Connection” and fix any errors. If have any issues connecting, reach out to our support engineers on our Discord server.
- Make sure that your database allows access to PowerSync’s IPs — see Security and IP Filtering
- Click “Save”.
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Note: PowerSync automatically selects the “Beta” version of the Service when adding a MySQL connection while MySQL support is in alpha, as updates may be made against this version more frequently.
Was this page helpful?