
Why choose Square Cloud?
Managed PostgreSQL, MySQL, MongoDB and Redis instances, provisioned in a couple of clicks and reachable only over encrypted SSL/TLS connections. You get a production database without tuning a server, scheduling snapshots or paying for the bandwidth your app moves.NVMe-backed storage
Zero network fees
Daily snapshots
Encrypted by default
Supported databases
Every engine comes configured and ready to connect. Each page covers the connection, permissions, what is available and the common errors of that engine.PostgreSQL
pg_cron for scheduled jobs.MySQL
caching_sha2_password, full control of your databases, users and routines.MongoDB
explain() for tuning.Redis
rediss:// only, with Search, JSON, TimeSeries and vector sets built in.Versions
How do I host my database?
You need an active Standard plan or higher. For a full walkthrough with connection code in Node.js and Python, follow Create and connect a managed database. In short:Create a new database instance
Setting up your database instance
Finish your instance creation
How do I connect to my database?
Databases only accept SSL/TLS connections, and PostgreSQL and MongoDB also require the certificate as the client certificate. To connect:Get the credentials and certificates
Connect over SSL/TLS
.pem. Some ask for the .crt and .key files separately, or for a .p12.Start using your database
What every database includes
Snapshots and restore
- Automatic and manual: every database gets an automatic snapshot every day, on every plan with databases. You can also take one from the database’s Snapshots tab, the CLI or the API; manual snapshots count toward your plan’s daily allowance.
- Retention: the newest snapshot of each database is kept for 30 days; older ones for 7 days.
- What a snapshot holds: a logical export made by the engine itself (not a copy of its data files), plus the certificate. A stopped database is started briefly to take it.
- When a snapshot fails: the export passes about 10 GB (PostgreSQL and MySQL export uncompressed SQL text, so a database close to its storage limit may not fit), or one of your own locks blocks the export for more than 5 minutes. Each engine page lists its own cases.
- Restore replaces the whole database with the snapshot’s contents, on the current version. The swap happens only after the restore succeeds: if it fails, the current database is left untouched. Writes made after the snapshot are lost, and users and passwords return to what they were when it was taken (Redis keeps its current password). The database ends up running; if your apps can’t log in afterwards, use the password the dashboard shows, or reset it.
- Plan expiry: when a plan expires, a snapshot of each database is attempted before it is deleted, and those snapshots stay available for 30 days to restore into a new database.
Insights
The database’s Insights tab, refreshed every 60 seconds, shows:- Open connections, by client address (the third part of each IP address is masked), against the limit of 256.
- Slow queries: statements of 100 ms or more on PostgreSQL and MySQL (with their mean time) and on MongoDB, and Redis’s
SLOWLOG(10 ms or more).
Explorer
The database’s Explorer tab, in the dashboard, shows what the database holds without a client of your own: the databases, tables or collections of a PostgreSQL, MySQL or MongoDB database and their rows, which you can filter by the exact value of a column, or the keys of a Redis database. You can also insert, change or delete one row or one key at a time: each change shows its before and after for you to review before it is saved, and a deletion cannot be undone.- Only the owner of the database can use it, and the database must be running.
- A view, or a table without a primary key, can be read but not changed.
- There is no SQL console, no bulk edit and no import or export: for those, connect with your own client.
- It is available in the dashboard only, not through the API.
Password and certificate
You can reset either one from the database’s Connection tab or the API, while the database is running:- Password: on PostgreSQL, MySQL and MongoDB, the new password works at once for new connections, and connections already open keep running until they close; to end them after a leak, stop and start the database. Redis restarts to apply it, so every connection drops for a few seconds.
- Certificate: a new
.pemis generated and the database restarts. Every client needs the new file.
Stop, start and automatic restart
- Stop asks the database to shut down cleanly and allows it 5 seconds; a database still busy after that is stopped by force, and runs its crash recovery on the next start (which can take a while on large databases).
- Automatic restart: a database that crashes with an error restarts by itself, at most once an hour, and only if it had been running for at least 60 seconds. A database stopped for running out of memory stays stopped until you start it. A database that stops with its storage full is not restarted by itself either.
Something went wrong?
Database connection errors
ECONNREFUSED, MySQL authentication and MongoDB network errors.Database performance
Frequently asked questions
Which databases can I host?
Which databases can I host?
Which plan do I need?
Which plan do I need?
Can I see my data without installing a client?
Can I see my data without installing a client?
Can I connect from my computer or from another provider?
Can I connect from my computer or from another provider?
Can I choose the engine version?
Can I choose the engine version?
Can I get superuser or root access, or change the server settings?
Can I get superuser or root access, or change the server settings?
SET PERSIST on MySQL.Are replicas, high availability or a private network available?
Are replicas, high availability or a private network available?
Can I add more storage?
Can I add more storage?

