Addresses and data
Databases
Create databases and the users websites sign in with, choose where each user signs in from, and let other servers reach a database.
Last updated 14 min readView as Markdown
On this page
- Create a database
- Add a database user
- Who may sign in with a user
- So that it can really connect
- How to connect
- A database on its own server
- Who can reach this database server
- Use it from a site
- Test the connection, or undo it
- Database health
- Encrypted connections
- Who is signed in
- Read replica
- PostgreSQL extensions and administrators
- Database activity
- MongoDB
- Backups
Databases (in the server's Databases & backups tab) lists where your websites keep their data, and the users (a name and a password) they open it with. Technical name: MySQL, MariaDB, PostgreSQL, MongoDB.


A server needs database software first. Servers of the kinds Laravel server, WordPress server, AdonisJS server and Database server get one when they are set up; on other servers, install MySQL, MariaDB or PostgreSQL from Services › Install a service. See Services.
The easiest way to get a database for a site is to tick Create a database for this site when you add the site. Fuzops creates it and writes its name and password into the site's Environment.
Create a database#
- Choose Create database.
- Pick the Database type (when more than one is installed) and a Name: small letters, numbers and underscores, starting with a letter.
- To get its user at the same time, tick Also add a user that can open it, give it a User name and choose who may sign in with it (see below).
- Save. You get an empty database, and the user's password if you added one.
Otherwise, add a user afterwards so a website can use it.
Add a database user#
- Choose Add database user.
- Give it a User name, and tick the databases it may use. The user can read and change everything in the databases you tick, and nothing in the others.
- Choose Who may sign in with it? (see the next section). Leave it on Only websites on this server unless a website on another server needs this database.
- Let Fuzops make a password, or Type my own password (16 to 128 characters, without quotes, spaces or the
$sign). - Save, then copy the password. It is shown only this once. Fuzops keeps it encrypted and cannot show it again. For a user that signs in from another server, the same card shows what to type there: this server's address, the user name and the password.
To change a user later, open its menu and choose Edit: change the databases it may use, or set a new password. Delete this user… and Delete this database… ask you to confirm first.
Who may sign in with a user#
Each database user says where it may sign in from. Technical name: the user's host (MySQL and MariaDB), pg_hba.conf (PostgreSQL). On a website server a new user starts on Only websites on this server; on a database server it starts on One other server or address.


| Choice | Who can sign in | Technical name |
|---|---|---|
| Only websites on this server (recommended) | Websites and tools on this server. Nobody outside can sign in, even with the password. | localhost |
| One other server or address | One IP address, such as 203.0.113.9, or a network such as 203.0.113.0/24. Pick one of your servers by name and Fuzops fills in its address. |
an IP address or network |
| Any address | Anyone on the internet who has the password. | % (every address) |
To change it later, open the user's menu and choose Change who can sign in…. The password and the databases it can use stay the same, and websites using it keep working from the places it still allows.
So that it can really connect#
A user that may sign in from another address only gets in when the server lets that address reach the database too. When you choose another address, the form shows what is still missing and asks for each step:
- Let the database accept connections from the network. Out of the box the database only answers this server. Changing it restarts the database, so websites on this server cannot reach their database for a few seconds. Technical name:
bind-address(MySQL, MariaDB),listen_addresses(PostgreSQL). - Add a firewall rule so that address, and only that address, can reach the database. For Any address this step opens the database to everyone and is never ticked for you.
The user's quick look then says where it can sign in from and whether the server accepts connections from there, for example "Can sign in from 203.0.113.9 · the server accepts connections from there". If something still blocks it, the quick look says which step and offers it.
When a user moves away from an address, or is deleted, and no other user needs that address, its firewall rule is removed again. On a database server the list under Who can reach this database server stays as you set it.
A user that may sign in from any address can also be tried from every address the firewall lets in, so limit such users to this server when only websites here use them. Site users made before you could choose may sign in from any address: when there are some, the Databases page offers Limit all site users to this server… once. Their passwords and databases stay the same and the websites keep working.
How to connect#
How to connect shows the address a website on this server uses to reach its database, for example 127.0.0.1:3306 for MySQL and MariaDB, 127.0.0.1:5432 for PostgreSQL.
Below it, each database says whether it accepts connections only from this server or from the network. Accept connections from the network… and Back to this server only… change it; both restart the database and ask you first. When no user signs in from another server any more, put it back to this server only.
A database on its own server#
A Database server (a server of that kind) only stores data. Your website servers, in Fuzops or anywhere else, connect to it over the network. It is set up for that from the start:
- It accepts connections from the network, and offers encrypted connections (TLS) to the programs that ask for them.
- Every user signs in with a password, checked with a strong method. Nothing can sign in without one.
- It is closed to everyone until you allow someone. Nothing is opened to the whole internet unless you choose it.
The step-by-step guide is Set up a separate database server and connect a site to it.
Who can reach this database server#
On the database server's Databases page, Who can reach this database server is the one list of who gets through its firewall to the database. Technical name: firewall rule for the database, allowed addresses.
- Your website servers: each of your team's website servers with an Allow button. When a server has a private network address and a public one, choose which; Fuzops suggests the private one when both servers share a private network.
- Another address or range: type one IP address, such as
203.0.113.9, or a network such as203.0.113.0/24, for a server outside Fuzops. - Allow any address…: opens the database server to everyone. You confirm by typing, because each user's password is then the only protection.
Remove takes an entry off the list and closes the database to it again.
On a database server, Add database user starts on One other server or address, with your website servers offered first. Its So that it can really connect step adds that address to this same list when it is not on it yet, so the two never disagree.
Use it from a site#
On a website server's Databases page, Use a database on another server… connects one of its sites to a database server in a few clicks:
- Choose the Site and the Database server.
- Choose Create and connect.
Fuzops creates the database and its user on the database server, lets that user sign in only from the website server, adds the website server to Who can reach this database server if it is not there yet, and writes the connection details into the site's Environment. The password is shown once on the page too.
Fuzops picks the website server's private network address when both servers share a private network, otherwise their public addresses. If the two servers cannot reach each other, it says so and changes nothing.
Before you choose Create and connect, Fuzops warns you when the two servers are in different regions, or can only reach each other over the internet: every query then travels further, so pages are slower.
Test the connection, or undo it#
Each connected site is listed under Use a database on another server with two buttons:
- Test the connection signs in to the database from the website server with the site's own user, three times, and shows the best time in milliseconds. When the website server has no database program to sign in with, only the network is checked, and the page says so. If it cannot connect, the page shows why, for example that the database server's list keeps this server out.
- Undo… (you type the site's address to confirm) removes the site's user on the database server, takes the website server off Who can reach this database server when nothing else needs it, and puts the site's earlier database lines back into its settings file. The database itself, with its data, stays on the database server until you delete it there.
Database health#
Database health (on the Databases page, and in the menu under Where data lives) shows how the databases of a server are doing. Read now reads them; it changes nothing and takes a few seconds. The page then opens on the last reading.
- Connections: how many are in use, out of the limit, and the most at once since the database started. Close to the limit, new connections are refused.
- Running now: the queries running when it was read, how long each has run, who started it and from where. Stop this query… stops one (you confirm): it ends with an error for whoever started it, its connection stays open and what it changed is undone. Stopping a query needs a role that may run commands.
- Slow queries: the slowest queries, grouped by shape: the same query with other values counts once (
select * from orders where id = ?), with how many times it ran, the total and the average time. Record queries slower than (ms) turns the recording on with your own threshold, without a restart. For MySQL and MariaDB it lasts until the database restarts (Recommended settings keeps it for good); for PostgreSQL it stays, and Back to the recommended settings undoes it. When PostgreSQL counts every query itself (pg_stat_statements), the list comes from there. - Sizes: each database and the largest tables. For PostgreSQL, how many rows wait to be cleaned up and when the table was last cleaned up; Clean up now… (technical name: vacuum) frees that space while reads and writes go on. Refresh its numbers… (analyze) helps the database pick the fastest way to answer. For MySQL and MariaDB, Rebuild to free space… (optimize) gives unused space back; the confirmation says when the table is locked while it runs.
The text of a query can hold your data: only members who may see the server's secrets see it. Connections and sizes are on every plan; slow and running queries and the table tools are on Pro and Business.
Encrypted connections#
Websites on another server, and you from your own computer, can reach a database over an encrypted connection. Under How to connect, Turn on encrypted connections… sets it up for one database engine:
- Fuzops makes a small certificate authority on the server, used only for its databases, and a certificate that names every address of the server. Database programs connect by address, often a private one, and a certificate from a public authority cannot name a private address; so each server has its own authority, and its private key never leaves the server.
- PostgreSQL and MySQL take it without a restart. MariaDB restarts once the first time (a few seconds).
- Download the certificate gives the authority's certificate: give it to your app or database program so it checks it is really talking to your server.
Then, on a user that signs in from another server, Require encryption makes the server refuse that user's unencrypted connections. Allow without encryption turns it off again. A user that signs in only from this server never leaves the server, so it has nothing to encrypt.
When a site reaches its database server over a public address, Use a database on another server turns encryption on by default: the site's user must encrypt, the authority's certificate is placed on the website server, and the site's settings ask for an encrypted, verified connection. Fuzops does this for Laravel sites and for PostgreSQL connection addresses; for other kinds it says that the connection is not encrypted so you can set it in the app. Test the connection says whether the session was encrypted and whether the server's certificate was verified.
Who is signed in#
Each user's quick look shows how many sessions it has now, from the last Database health reading. PostgreSQL can also show each user's last sign-in when Record sign-ins is on (on Database health): every sign-in is then one short line in its log, so it is a switch, never on by itself. MySQL and MariaDB keep no time of each sign-in without a full log of every connection, so Fuzops shows the users signed in now and, where the database counts them, the sign-ins since it started.
Read replica#
A read replica is a second database server that copies a first one all the time. It answers read-only queries, so reports and heavy reading do not slow your sites, and it can take over when the first server is lost. It is available for PostgreSQL, MySQL and MariaDB database servers on the Business plan.
Open the first database server's Read replica page and choose the server that becomes the copy. It must be another empty database server of your team, with the same database engine and version (the same major version for PostgreSQL, the same major and minor version such as 11.4 for MySQL and MariaDB), that can reach the first one. You type its name to confirm.
- A replication user is made on the first server that can sign in only from the copy's address, and only that address is let through. When encrypted connections are on, the copy connects encrypted and verifies the first server.
- MySQL and MariaDB need a record of every change (the binary log). If the first server does not keep one yet, it restarts once to start it (a few seconds; its settings are checked first). If it already keeps one, nothing restarts. MySQL and MariaDB copies follow the first server by transaction number (GTID), which every version Fuzops installs supports.
- The copy is filled with the database's own tool (PostgreSQL's copy tool, or the MySQL and MariaDB export tool in one consistent moment) while the first server keeps working, then follows every change within a second or so. For MySQL and MariaDB the database users are copied too.
- The copy refuses writes until it is promoted. Its Recommended settings never go below the first server's where the copy needs as much (for example the number of connections for PostgreSQL), and say why.
- Both servers show how far behind the copy is. Fuzops checks them every ten minutes and tells you on Home when the copy stops copying.
Promote this replica… turns the copy into a database server of its own that accepts writes, with the data it has. Use it when the first server is lost, or to move to the copy. Your sites keep using the first server until you change their settings. It cannot be undone: to copy again, set up a new replica.
Remove replication… stops the copying: the copy keeps its data as a database server of its own, and the replication user and its address are removed from the first server.
PostgreSQL extensions and administrators#
For PostgreSQL databases, PostgreSQL extensions and administrators lets you:
- Enable an extension on one database, such as fuzzy text search (
pg_trgm) or maps and places (PostGIS). - Make administrator… a user. An administrator can read, change and delete every database on the server, and run programs as the database service, so Fuzops asks you to confirm by typing.
Database activity#
Database activity (on the Databases page) shows connections and reads and writes over the last 24 hours, measured every few minutes by the server's monitoring. It fills in once monitoring has run for a while.
MongoDB#
MongoDB is a document database some apps need. Install MongoDB installs MongoDB 8.0 from MongoDB's own packages. It uses at least 300 MB of memory. Only programs on this server can reach it, and every connection must sign in. Each database gets its own user. MongoDB users always sign in from this server only: they cannot be opened to another server from Fuzops.
Backups#
Back up databases on a timetable from Backups. See Backups and restore.
A database on a database server is backed up from that server's Backups page: the backup runs on the database server itself. A site that uses it keeps its files in its own backups; its database is in the database server's.
Still stuck? Get help